Class IndependentSequenceTrainer<T extends Output<T>>
java.lang.Object
org.tribuo.sequence.IndependentSequenceTrainer<T>
- Type Parameters:
T- The output type.
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>,SequenceTrainer<T>
public class IndependentSequenceTrainer<T extends Output<T>>
extends Object
implements SequenceTrainer<T>
Trains a sequence model by training a regular model to independently predict every example in each sequence.
-
Constructor Summary
ConstructorsConstructorDescriptionIndependentSequenceTrainer(Trainer<T> innerTrainer) Builds a sequence trainer which uses aTrainerto independently predict each sequence element. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of times the train method has been invoked.toString()train(SequenceDataset<T> sequenceExamples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) Trains a sequence prediction model using the examples in the given data set.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfigMethods inherited from interface org.tribuo.sequence.SequenceTrainer
train
-
Constructor Details
-
IndependentSequenceTrainer
-
-
Method Details
-
train
public IndependentSequenceModel<T> train(SequenceDataset<T> sequenceExamples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) Description copied from interface:SequenceTrainerTrains a sequence prediction model using the examples in the given data set.- Specified by:
trainin interfaceSequenceTrainer<T extends Output<T>>- Parameters:
sequenceExamples- the data set containing the examples.runProvenance- Training run specific provenance (e.g., fold number).- Returns:
- a predictive model that can be used to generate predictions for new examples.
-
getInvocationCount
public int getInvocationCount()Description copied from interface:SequenceTrainerReturns the number of times the train method has been invoked.- Specified by:
getInvocationCountin interfaceSequenceTrainer<T extends Output<T>>- Returns:
- The number of times train has been invoked.
-
toString
-
getProvenance
-