Class IndependentMultiLabelTrainer
java.lang.Object
org.tribuo.multilabel.baseline.IndependentMultiLabelTrainer
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
,Trainer<MultiLabel>
Trains n independent binary
Model
s, each of which predicts a single Label
.
Then wraps it up in an IndependentMultiLabelModel
to provide a MultiLabel
prediction.
It trains each model sequentially, and could be optimised to train in parallel.
-
Field Summary
Fields inherited from interface org.tribuo.Trainer
DEFAULT_SEED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The number of times this trainer instance has had it's train method invoked.toString()
train
(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) Trains a predictive 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, wait
Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
-
Constructor Details
-
IndependentMultiLabelTrainer
-
-
Method Details
-
train
public Model<MultiLabel> train(Dataset<MultiLabel> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) Description copied from interface:Trainer
Trains a predictive model using the examples in the given data set.- Specified by:
train
in interfaceTrainer<MultiLabel>
- Parameters:
examples
- 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
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<MultiLabel>
- Returns:
- The number of train invocations.
-
toString
-
getProvenance
- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
-