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

public class UniqueAggregator extends Object implements FeatureAggregator
Aggregates feature tokens, generating unique features.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs 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

    Modifier and Type
    Method
    Description
    Aggregates feature values with the same names.
    com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
     

    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

      public List<Feature> aggregate(List<Feature> input)
      Description copied from interface: FeatureAggregator
      Aggregates feature values with the same names.
      Specified by:
      aggregate in interface FeatureAggregator
      Parameters:
      input - The input features.
      Returns:
      The output features.
    • getProvenance

      public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
      Specified by:
      getProvenance in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>