public abstract class AbstractFeatureFormatMapper<T> extends java.lang.Object implements FeatureFormatMapper<T>
| Constructor and Description |
|---|
AbstractFeatureFormatMapper() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.RuntimeException |
cannotConvertToFeatureValue(FeatureType featureType,
T externalValue) |
protected java.lang.RuntimeException |
cannotConvertToFeatureValue(FeatureType featureType,
T externalValue,
java.lang.Exception cause) |
protected abstract T |
fromBooleanFeatureValue(BooleanFeatureValue featureValue) |
protected abstract T |
fromCategoricalFeatureValue(CategoricalFeatureValue featureValue) |
protected abstract T |
fromCategoricalSetFeatureValue(CategoricalSetFeatureValue featureValue) |
protected abstract T |
fromDenseVectorFeatureValue(DenseVectorFeatureValue featureValue) |
T |
fromFeatureValue(FeatureValue featureValue)
Converts a feature value into the external representation
|
protected abstract T |
fromNumericFeatureValue(NumericFeatureValue featureValue) |
protected abstract T |
fromTensorFeatureValue(TensorFeatureValue featureValue) |
protected abstract T |
fromTermVectorFeatureValue(TermVectorFeatureValue featureValue) |
protected abstract BooleanFeatureValue |
toBooleanFeatureValue(BooleanFeatureType featureType,
T externalValue) |
protected abstract CategoricalFeatureValue |
toCategoricalFeatureValue(CategoricalFeatureType featureType,
T externalValue) |
protected abstract CategoricalSetFeatureValue |
toCategoricalSetFeatureValue(CategoricalSetFeatureType featureType,
T externalValue) |
protected abstract DenseVectorFeatureValue |
toDenseVectorFeatureValue(DenseVectorFeatureType featureType,
T externalValue) |
FeatureValue |
toFeatureValue(FeatureType featureType,
T externalValue)
Converts a datum in the external representation into the FeatureValue format.
|
protected abstract NumericFeatureValue |
toNumericFeatureValue(NumericFeatureType featureType,
T externalValue) |
protected abstract TensorFeatureValue |
toTensorFeatureValue(TensorFeatureType featureType,
T externalValue) |
protected abstract TermVectorFeatureValue |
toTermVectorFeatureValue(TermVectorFeatureType featureType,
T externalValue) |
public T fromFeatureValue(FeatureValue featureValue)
FeatureFormatMapperfromFeatureValue in interface FeatureFormatMapper<T>featureValue - the FeatureValueprotected abstract T fromNumericFeatureValue(NumericFeatureValue featureValue)
protected abstract T fromBooleanFeatureValue(BooleanFeatureValue featureValue)
protected abstract T fromCategoricalFeatureValue(CategoricalFeatureValue featureValue)
protected abstract T fromCategoricalSetFeatureValue(CategoricalSetFeatureValue featureValue)
protected abstract T fromTermVectorFeatureValue(TermVectorFeatureValue featureValue)
protected abstract T fromDenseVectorFeatureValue(DenseVectorFeatureValue featureValue)
protected abstract T fromTensorFeatureValue(TensorFeatureValue featureValue)
public FeatureValue toFeatureValue(FeatureType featureType, T externalValue)
FeatureFormatMappertoFeatureValue in interface FeatureFormatMapper<T>featureType - type of this featureexternalValue - datum in the external representationprotected abstract NumericFeatureValue toNumericFeatureValue(NumericFeatureType featureType, T externalValue)
protected abstract BooleanFeatureValue toBooleanFeatureValue(BooleanFeatureType featureType, T externalValue)
protected abstract CategoricalFeatureValue toCategoricalFeatureValue(CategoricalFeatureType featureType, T externalValue)
protected abstract CategoricalSetFeatureValue toCategoricalSetFeatureValue(CategoricalSetFeatureType featureType, T externalValue)
protected abstract TermVectorFeatureValue toTermVectorFeatureValue(TermVectorFeatureType featureType, T externalValue)
protected abstract DenseVectorFeatureValue toDenseVectorFeatureValue(DenseVectorFeatureType featureType, T externalValue)
protected abstract TensorFeatureValue toTensorFeatureValue(TensorFeatureType featureType, T externalValue)
protected java.lang.RuntimeException cannotConvertToFeatureValue(FeatureType featureType, T externalValue, java.lang.Exception cause)
protected java.lang.RuntimeException cannotConvertToFeatureValue(FeatureType featureType, T externalValue)