Class UniqueProcessor

java.lang.Object
org.tribuo.data.columnar.processors.feature.UniqueProcessor
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, FeatureProcessor

public class UniqueProcessor extends Object implements FeatureProcessor
Processes a feature list, aggregating all the feature values with the same name.

The aggregation is user controllable.

In most cases this will be unnecessary as the feature names will be unique as they are keyed by the field name, however it's possible to induce collisions via text fields or other mechanisms.

  • Constructor Details

    • UniqueProcessor

      public UniqueProcessor(UniqueProcessor.UniqueType reductionType)
      Creates a UniqueProcessor using the specified reduction operation.
      Parameters:
      reductionType - The reduction operation to perform.
  • Method Details

    • process

      public List<ColumnarFeature> process(List<ColumnarFeature> features)
      Description copied from interface: FeatureProcessor
      Processes a list of ColumnarFeatures, transforming it by adding conjunctions or removing unnecessary features.
      Specified by:
      process in interface FeatureProcessor
      Parameters:
      features - The list of features to process.
      Returns:
      A (possibly empty) list of 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>