Package org.tribuo.common.tree
Class ExtraTreesTrainer<T extends Output<T>>
java.lang.Object
org.tribuo.ensemble.BaggingTrainer<T>
org.tribuo.common.tree.ExtraTreesTrainer<T>
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
,Trainer<T>
A trainer which produces an Extremely Randomized Tree Ensemble.
Extremely Randomized Trees are similar to Random Forests, but they add an extra element of randomness in that the split points for features are also chosen randomly. As with Random Forests, feature subsampling is available at each of the nodes. An exception will be thrown if the inner trainer is not a decision tree trainer or if random splitting is turned off.
See:
P. Geurts, D. Ernst, L. Wehenkel. "Extremely Randomized Trees" March 2006. PDF
-
Field Summary
Fields inherited from class org.tribuo.ensemble.BaggingTrainer
combiner, innerTrainer, numMembers, rng, seed, trainInvocationCounter
Fields inherited from interface org.tribuo.Trainer
DEFAULT_SEED, INCREMENT_INVOCATION_COUNT
-
Constructor Summary
ConstructorDescriptionExtraTreesTrainer
(DecisionTreeTrainer<T> trainer, EnsembleCombiner<T> combiner, int numMembers) Constructs an ExtraTreesTrainer with the default seedTrainer.DEFAULT_SEED
.ExtraTreesTrainer
(DecisionTreeTrainer<T> trainer, EnsembleCombiner<T> combiner, int numMembers, long seed) Constructs an ExtraTreesTrainer with the supplied seed, trainer, combining function and number of members. -
Method Summary
Methods inherited from class org.tribuo.ensemble.BaggingTrainer
getInvocationCount, getProvenance, setInvocationCount, train, train, train, trainSingleModel
-
Constructor Details
-
ExtraTreesTrainer
public ExtraTreesTrainer(DecisionTreeTrainer<T> trainer, EnsembleCombiner<T> combiner, int numMembers) Constructs an ExtraTreesTrainer with the default seedTrainer.DEFAULT_SEED
.Throws
PropertyException
if the trainer is not set to use random split points.- Parameters:
trainer
- The tree trainer.combiner
- The combining function for the ensemble.numMembers
- The number of ensemble members to train.
-
ExtraTreesTrainer
public ExtraTreesTrainer(DecisionTreeTrainer<T> trainer, EnsembleCombiner<T> combiner, int numMembers, long seed) Constructs an ExtraTreesTrainer with the supplied seed, trainer, combining function and number of members.Throws
PropertyException
if the trainer is not set to use random split points.- Parameters:
trainer
- The tree trainer.combiner
- The combining function for the ensemble.numMembers
- The number of ensemble members to train.seed
- The RNG seed.
-
-
Method Details
-
postConfig
public void postConfig()Description copied from class:BaggingTrainer
Used by the OLCUT configuration system, and should not be called by external code.- Specified by:
postConfig
in interfacecom.oracle.labs.mlrg.olcut.config.Configurable
- Overrides:
postConfig
in classBaggingTrainer<T extends Output<T>>
-
ensembleName
Description copied from class:BaggingTrainer
Default name of the generated ensemble.- Overrides:
ensembleName
in classBaggingTrainer<T extends Output<T>>
- Returns:
- The default ensemble name.
-
toString
- Overrides:
toString
in classBaggingTrainer<T extends Output<T>>
-