Class DoubleExtractor

java.lang.Object
org.tribuo.data.columnar.extractors.SimpleFieldExtractor<Double>
org.tribuo.data.columnar.extractors.DoubleExtractor
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<Double>

Extracts the field value and converts it to a double.

Returns an empty optional if the value failed to parse.

  • Constructor Details

    • DoubleExtractor

      public DoubleExtractor(String fieldName)
      Extracts a double value from the supplied field name. Writes the metadata out using the field name as the key.
      Parameters:
      fieldName - The field name to inspect.
    • DoubleExtractor

      public DoubleExtractor(String fieldName, String metadataName)
      Extracts a double value from the supplied field name. Writes the metadata out using the metadataName as the key.
      Parameters:
      fieldName - The field name to inspect.
      metadataName - The metadata name to emit.
  • Method Details