Class TransformTrainer<T extends Output<T>>
java.lang.Object
org.tribuo.transform.TransformTrainer<T>
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
,Trainer<T>
A
Trainer
which encapsulates another trainer plus a TransformationMap
object
to apply to each Dataset
before training each Model
.
Transformations only operate on observed values. To operate on implicit zeros then
first call MutableDataset.densify()
on the datasets.
-
Field Summary
Fields inherited from interface org.tribuo.Trainer
DEFAULT_SEED
-
Constructor Summary
ConstructorsConstructorDescriptionTransformTrainer
(Trainer<T> innerTrainer, TransformationMap transformations) Creates a trainer which transforms the data before training, and stores the transformers along with the trained model in aTransformedModel
.TransformTrainer
(Trainer<T> innerTrainer, TransformationMap transformations, boolean densify) Creates a trainer which transforms the data before training, and stores the transformers along with the trained model in aTransformedModel
. -
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
-
TransformTrainer
Creates a trainer which transforms the data before training, and stores the transformers along with the trained model in aTransformedModel
.This constructor makes a trainer which keeps the data sparse.
- Parameters:
innerTrainer
- The trainer to use.transformations
- The transformations to apply to the data first.
-
TransformTrainer
public TransformTrainer(Trainer<T> innerTrainer, TransformationMap transformations, boolean densify) Creates a trainer which transforms the data before training, and stores the transformers along with the trained model in aTransformedModel
.- Parameters:
innerTrainer
- The trainer to use.transformations
- The transformations to apply to the data first.densify
- Densify the dataset (and any predict time data) before training/prediction.
-
-
Method Details
-
train
-
getInvocationCount
Description copied from interface:Trainer
The number of times this trainer instance has had it's train method invoked.This is used to determine how many times the trainer's RNG has been accessed to ensure replicability in the random number stream.
- Specified by:
getInvocationCount
in interfaceTrainer<T extends Output<T>>
- Returns:
- The number of train invocations.
-
getProvenance
-