Class TransformationMap

java.lang.Object
org.tribuo.transform.TransformationMap
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>

public class TransformationMap extends Object implements com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
A carrier type for a set of transformations to be applied to a Dataset.

Feature specific transformations are specified using a regex. If multiple regexes match a given feature, then an IllegalArgumentException is thrown when Dataset.createTransformers(TransformationMap) is called.

Global transformations are applied after all feature specific transformations.

Transformations only operate on observed values. To operate on implicit zeros then first call MutableDataset.densify() on the datasets.

  • Constructor Details

  • Method Details

    • postConfig

      public void postConfig()
      Used by the OLCUT configuration system, and should not be called by external code.
      Specified by:
      postConfig in interface com.oracle.labs.mlrg.olcut.config.Configurable
    • validateTransformations

      public boolean validateTransformations(FeatureMap featureMap)
      Checks that a given transformation set doesn't have conflicts when applied to the supplied featureMap.
      Parameters:
      featureMap - The featureMap to check.
      Returns:
      True if the transformation set doesn't have conflicts, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getGlobalTransformations

      Gets the global transformations in this TransformationMap.
      Returns:
      The global transformations
    • getFeatureTransformations

      Gets the map of feature specific transformations.
      Returns:
      The feature specific transformations.
    • 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>