Package org.tribuo.data.text.impl
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
ConstructorDescriptionConstructs 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, wait
Methods 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:FeatureAggregator
Aggregates feature values with the same names.- Specified by:
aggregate
in interfaceFeatureAggregator
- Parameters:
input
- The input features.- Returns:
- The output features.
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-