Class IdentityProcessor
java.lang.Object
org.tribuo.data.columnar.processors.field.IdentityProcessor
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,FieldProcessor
A
FieldProcessor which converts the field name and value into a feature with a value of FEATURE_VALUE.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.tribuo.data.columnar.FieldProcessor
FieldProcessor.GeneratedFeatureType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe value of the emitted features.Fields inherited from interface org.tribuo.data.columnar.FieldProcessor
NAMESPACE -
Constructor Summary
ConstructorsConstructorDescriptionIdentityProcessor(String fieldName) Constructs a field processor which emits a single feature with a specific value and uses the field name and field value as the feature name. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this FieldProcessor bound to the supplied newFieldName.Returns the feature type this FieldProcessor generates.Gets the field name this FieldProcessor uses.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenanceProcesses the field value and generates a (possibly empty) list ofColumnarFeatures.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfigMethods inherited from interface org.tribuo.data.columnar.FieldProcessor
getNumNamespaces
-
Field Details
-
FEATURE_VALUE
public static final double FEATURE_VALUEThe value of the emitted features.- See Also:
-
-
Constructor Details
-
IdentityProcessor
Constructs a field processor which emits a single feature with a specific value and uses the field name and field value as the feature name.- Parameters:
fieldName- The field name to read.
-
-
Method Details
-
getFieldName
Description copied from interface:FieldProcessorGets the field name this FieldProcessor uses.- Specified by:
getFieldNamein interfaceFieldProcessor- Returns:
- The field name.
-
process
Description copied from interface:FieldProcessorProcesses the field value and generates a (possibly empty) list ofColumnarFeatures.- Specified by:
processin interfaceFieldProcessor- Parameters:
value- The field value to process.- Returns:
- A list of
ColumnarFeatures.
-
getFeatureType
Description copied from interface:FieldProcessorReturns the feature type this FieldProcessor generates.- Specified by:
getFeatureTypein interfaceFieldProcessor- Returns:
- The feature type.
-
copy
Description copied from interface:FieldProcessorReturns a copy of this FieldProcessor bound to the supplied newFieldName.- Specified by:
copyin interfaceFieldProcessor- Parameters:
newFieldName- The new field name for the copy.- Returns:
- A copy of this FieldProcessor.
-
toString
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()- Specified by:
getProvenancein interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-