Class UniqueAggregator
java.lang.Object
org.tribuo.data.text.impl.UniqueAggregator
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,FeatureAggregator
Aggregates feature tokens, generating unique features.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an aggregator that replaces all features with the same name with a single feature with the last observed value of that feature.UniqueAggregator(double value) Constructs an aggregator that replaces all features with the same name with a single feature with the specified value. -
Method Summary
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
-
UniqueAggregator
public UniqueAggregator(double value) Constructs an aggregator that replaces all features with the same name with a single feature with the specified value.- Parameters:
value- The inserted feature value.
-
UniqueAggregator
public UniqueAggregator()Constructs an aggregator that replaces all features with the same name with a single feature with the last observed value of that feature.
-
-
Method Details
-
aggregate
Description copied from interface:FeatureAggregatorAggregates feature values with the same names.- Specified by:
aggregatein interfaceFeatureAggregator- Parameters:
input- The input features.- Returns:
- The output features.
-
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>
-