Class CARTClassificationTrainer
java.lang.Object
org.tribuo.common.tree.AbstractCARTTrainer<Label>
org.tribuo.classification.dtree.CARTClassificationTrainer
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>,DecisionTreeTrainer<Label>,SparseTrainer<Label>,Trainer<Label>,WeightedExamples
-
Nested Class Summary
Nested classes/interfaces inherited from class org.tribuo.common.tree.AbstractCARTTrainer
AbstractCARTTrainer.AbstractCARTTrainerProvenance -
Field Summary
Fields inherited from class org.tribuo.common.tree.AbstractCARTTrainer
fractionFeaturesInSplit, maxDepth, MIN_EXAMPLES, minChildWeight, rng, seed, trainInvocationCounterFields inherited from interface org.tribuo.Trainer
DEFAULT_SEED -
Constructor Summary
ConstructorsConstructorDescriptionCreates a CART Trainer.CARTClassificationTrainer(int maxDepth) Creates a CART trainer.CARTClassificationTrainer(int maxDepth, float minChildWeight, float fractionFeaturesInSplit, LabelImpurity impurity, long seed) Creates a CART Trainer.CARTClassificationTrainer(int maxDepth, float fractionFeaturesInSplit, long seed) Creates a CART Trainer. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractTrainingNode<Label> mkTrainingNode(Dataset<Label> examples) toString()Methods inherited from class org.tribuo.common.tree.AbstractCARTTrainer
getFractionFeaturesInSplit, getInvocationCount, postConfig, train, train
-
Constructor Details
-
CARTClassificationTrainer
public CARTClassificationTrainer(int maxDepth, float minChildWeight, float fractionFeaturesInSplit, LabelImpurity impurity, long seed) Creates a CART Trainer.- Parameters:
maxDepth- The maximum depth of the tree.minChildWeight- The minimum node weight to consider it for a split.fractionFeaturesInSplit- The fraction of features available in each split.impurity- Impurity measure to determine split quality. SeeLabelImpurity.seed- The RNG seed.
-
CARTClassificationTrainer
public CARTClassificationTrainer()Creates a CART Trainer. Sets the impurity to theGiniIndex. -
CARTClassificationTrainer
Creates a CART trainer. Sets the impurity to theGiniIndex, uses all the features, and sets the minimum number of examples in a leaf toAbstractCARTTrainer.MIN_EXAMPLES.- Parameters:
maxDepth- The maximum depth of the tree.
-
CARTClassificationTrainer
Creates a CART Trainer. Sets the impurity to theGiniIndex.- Parameters:
maxDepth- The maximum depth of the tree.fractionFeaturesInSplit- The fraction of features available in each split.seed- The seed for the RNG.
-
-
Method Details
-
mkTrainingNode
- Specified by:
mkTrainingNodein classAbstractCARTTrainer<Label>
-
toString
-
getProvenance
-