Class IndexExtractor
java.lang.Object
org.tribuo.data.columnar.extractors.IndexExtractor
- 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<Long>
An Extractor with special casing for loading the index from a Row.
 The index is written out as a Long.
 
This is the row wise count, i.e., the number of examples that the data source has processed, rather than anything extracted from the data.
- 
Constructor Summary
ConstructorsConstructorDescriptionExtracts the index writing to the default metadata field nameExample.NAME.IndexExtractor(String metadataName) Extracts the index, writing to the supplied metadata field name. - 
Method Summary
Modifier and TypeMethodDescriptionReturns Optional which is filled if extraction succeeded.Gets the metadata key name.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenanceGets the class of the value produced by this extractor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig 
- 
Constructor Details
- 
IndexExtractor
Extracts the index, writing to the supplied metadata field name.- Parameters:
 metadataName- The metadata field to write to.
 - 
IndexExtractor
public IndexExtractor()Extracts the index writing to the default metadata field nameExample.NAME. 
 - 
 - 
Method Details
- 
getMetadataName
Description copied from interface:FieldExtractorGets the metadata key name. This is the key into which this value will be written in anExampleif it is given toRowProcessor.- Specified by:
 getMetadataNamein interfaceFieldExtractor<Long>- Returns:
 - The metadata key name.
 
 - 
getValueType
Description copied from interface:FieldExtractorGets the class of the value produced by this extractor.- Specified by:
 getValueTypein interfaceFieldExtractor<Long>- Returns:
 - The class of the value.
 
 - 
extract
Description copied from interface:FieldExtractorReturns Optional which is filled if extraction succeeded.- Specified by:
 extractin interfaceFieldExtractor<Long>- Parameters:
 row- The raw row from which to extract a value- Returns:
 - A value.
 
 - 
getProvenance
- Specified by:
 getProvenancein interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
 
 -