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 SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.ConfigurablepostConfigMethods inherited from interface org.tribuo.sequence.SequenceTrainertrain
- 
Constructor Details- 
HashingSequenceTrainer
 
- 
- 
Method Details- 
trainpublic 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 interface- SequenceTrainer<T extends Output<T>>
- Parameters:
- sequenceExamples- The input dataset.
- instanceProvenance- Training run specific provenance information.
- Returns:
- A trained SequenceModel.
 
- 
getInvocationCountDescription copied from interface:SequenceTrainerReturns the number of times the train method has been invoked.- Specified by:
- getInvocationCountin interface- SequenceTrainer<T extends Output<T>>
- Returns:
- The number of times train has been invoked.
 
- 
toString
- 
getProvenance
 
-