Class HashingSequenceTrainer<T extends Output<T>>
java.lang.Object
org.tribuo.sequence.HashingSequenceTrainer<T>
- Type Parameters:
T- The type of the output.
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>,SequenceTrainer<T>
public final class HashingSequenceTrainer<T extends Output<T>>
extends Object
implements SequenceTrainer<T>
A SequenceTrainer that hashes all the feature names on the way in.
It wraps another SequenceTrainer which actually builds the SequenceModel.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
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> instanceProvenance) This clones theSequenceDataset, hashes each of the examples and rewrites their feature ids before passing it to the inner trainer.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
-
HashingSequenceTrainer
-
-
Method Details
-
train
public SequenceModel<T> train(SequenceDataset<T> sequenceExamples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) This clones theSequenceDataset, hashes each of the examples and rewrites their feature ids before passing it to the inner trainer.This ensures the Trainer sees the data after the collisions, and thus builds the correct size data structures.
- Specified by:
trainin interfaceSequenceTrainer<T extends Output<T>>- Parameters:
sequenceExamples- The input dataset.instanceProvenance- Training run specific provenance information.- Returns:
- A trained
SequenceModel.
-
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
-