Class FloatExtractor
java.lang.Object
org.tribuo.data.columnar.extractors.SimpleFieldExtractor<Float>
org.tribuo.data.columnar.extractors.FloatExtractor
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,FieldExtractor<Float>
Extracts the field value and converts it to a float.
Returns an empty optional if the value failed to parse.
-
Field Summary
Fields inherited from class org.tribuo.data.columnar.extractors.SimpleFieldExtractor
fieldName, metadataName -
Constructor Summary
ConstructorsConstructorDescriptionFloatExtractor(String fieldName) Extracts a float value from the supplied field name.FloatExtractor(String fieldName, String metadataName) Extracts a float value from the supplied field name. -
Method Summary
Modifier and TypeMethodDescriptionextractField(String value) Extracts the field value, or returnsOptional.empty()if it failed to parse.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenanceGets the class of the value produced by this extractor.Methods inherited from class org.tribuo.data.columnar.extractors.SimpleFieldExtractor
extract, getFieldName, getMetadataName, postConfig, toString
-
Constructor Details
-
FloatExtractor
Extracts a float value from the supplied field name. Writes the metadata out using the field name as the key.- Parameters:
fieldName- The field name to inspect.
-
FloatExtractor
-
-
Method Details
-
getValueType
Description copied from interface:FieldExtractorGets the class of the value produced by this extractor.- Returns:
- The class of the value.
-
extractField
Description copied from class:SimpleFieldExtractorExtracts the field value, or returnsOptional.empty()if it failed to parse.- Specified by:
extractFieldin classSimpleFieldExtractor<Float>- Parameters:
value- The field value to read.- Returns:
- The extracted value.
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
-