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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A carrier type as OLCUT does not support nested generics. -
Constructor Summary
ConstructorsConstructorDescriptionTransformationMap
(List<Transformation> globalTransformations) TransformationMap
(List<Transformation> globalTransformations, Map<String, List<Transformation>> featureTransformations) TransformationMap
(Map<String, List<Transformation>> featureTransformations) -
Method Summary
Modifier and TypeMethodDescriptionGets the map of feature specific transformations.Gets the global transformations in this TransformationMap.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
void
Used by the OLCUT configuration system, and should not be called by external code.toString()
boolean
validateTransformations
(FeatureMap featureMap) Checks that a given transformation set doesn't have conflicts when applied to the supplied featureMap.
-
Constructor Details
-
TransformationMap
public TransformationMap(List<Transformation> globalTransformations, Map<String, List<Transformation>> featureTransformations) -
TransformationMap
-
TransformationMap
-
-
Method Details
-
postConfig
Used by the OLCUT configuration system, and should not be called by external code.- Specified by:
postConfig
in interfacecom.oracle.labs.mlrg.olcut.config.Configurable
-
validateTransformations
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
-
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
- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-