public class CARTClassificationTrainer extends AbstractCARTTrainer<Label>
AbstractCARTTrainer.AbstractCARTTrainerProvenance
fractionFeaturesInSplit, maxDepth, MIN_EXAMPLES, minChildWeight, rng, seed, trainInvocationCounter
DEFAULT_SEED
Constructor and Description |
---|
CARTClassificationTrainer()
Creates 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.
|
Modifier and Type | Method and Description |
---|---|
TrainerProvenance |
getProvenance() |
protected AbstractTrainingNode<Label> |
mkTrainingNode(Dataset<Label> examples) |
String |
toString() |
getFractionFeaturesInSplit, getInvocationCount, postConfig, train, train
public CARTClassificationTrainer(int maxDepth, float minChildWeight, float fractionFeaturesInSplit, LabelImpurity impurity, long seed)
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. See LabelImpurity
.seed
- The RNG seed.public CARTClassificationTrainer()
GiniIndex
.public CARTClassificationTrainer(int maxDepth)
GiniIndex
, uses
all the features, and sets the minimum number of examples in a leaf to AbstractCARTTrainer.MIN_EXAMPLES
.maxDepth
- The maximum depth of the tree.public CARTClassificationTrainer(int maxDepth, float fractionFeaturesInSplit, long seed)
GiniIndex
.maxDepth
- The maximum depth of the tree.fractionFeaturesInSplit
- The fraction of features available in each split.seed
- The seed for the RNG.protected AbstractTrainingNode<Label> mkTrainingNode(Dataset<Label> examples)
mkTrainingNode
in class AbstractCARTTrainer<Label>
public TrainerProvenance getProvenance()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.