public class CARTClassificationTrainer extends AbstractCARTTrainer<Label>
AbstractCARTTrainer.AbstractCARTTrainerProvenance
fractionFeaturesInSplit, maxDepth, MIN_EXAMPLES, minChildWeight, minImpurityDecrease, rng, seed, trainInvocationCounter, useRandomSplitPoints
DEFAULT_SEED
Constructor and Description |
---|
CARTClassificationTrainer()
Creates a CART Trainer.
|
CARTClassificationTrainer(int maxDepth)
Creates a CART trainer.
|
CARTClassificationTrainer(int maxDepth,
float fractionFeaturesInSplit,
boolean useRandomSplitPoints,
long seed)
Creates a CART Trainer.
|
CARTClassificationTrainer(int maxDepth,
float minChildWeight,
float minImpurityDecrease,
float fractionFeaturesInSplit,
boolean useRandomSplitPoints,
LabelImpurity impurity,
long seed)
Creates a CART Trainer.
|
CARTClassificationTrainer(int maxDepth,
float minChildWeight,
float minImpurityDecrease,
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,
AbstractTrainingNode.LeafDeterminer leafDeterminer) |
String |
toString() |
getFractionFeaturesInSplit, getInvocationCount, getMinImpurityDecrease, getUseRandomSplitPoints, postConfig, train, train
public CARTClassificationTrainer(int maxDepth, float minChildWeight, float minImpurityDecrease, float fractionFeaturesInSplit, boolean useRandomSplitPoints, LabelImpurity impurity, long seed)
maxDepth
- The maximum depth of the tree.minChildWeight
- The minimum node weight to consider it for a split.minImpurityDecrease
- The minimum decrease in impurity necessary to split a node.fractionFeaturesInSplit
- The fraction of features available in each split.useRandomSplitPoints
- Whether to choose split points for features at random.impurity
- Impurity measure to determine split quality. See LabelImpurity
.seed
- The RNG seed.public CARTClassificationTrainer()
Sets the impurity to the GiniIndex
, uses all the features,
builds an arbitrary depth tree, computes the exact split point
and sets the minimum number of examples in a leaf to AbstractCARTTrainer.MIN_EXAMPLES
.
public CARTClassificationTrainer(int maxDepth)
Sets the impurity to the GiniIndex
, uses all the features,
computes the exact split point 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)
Sets the impurity to the GiniIndex
.
maxDepth
- The maximum depth of the tree.fractionFeaturesInSplit
- The fraction of features available in each split.seed
- The seed for the RNG.public CARTClassificationTrainer(int maxDepth, float fractionFeaturesInSplit, boolean useRandomSplitPoints, long seed)
Sets the impurity to the GiniIndex
. Computes the exact split point.
maxDepth
- The maximum depth of the tree.fractionFeaturesInSplit
- The fraction of features available in each split.useRandomSplitPoints
- Whether to choose split points for features at random.seed
- The seed for the RNG.public CARTClassificationTrainer(int maxDepth, float minChildWeight, float minImpurityDecrease, float fractionFeaturesInSplit, LabelImpurity impurity, long seed)
Computes the exact split point.
maxDepth
- The maximum depth of the tree.minChildWeight
- The minimum node weight to consider it for a split.minImpurityDecrease
- The minimum decrease in impurity necessary to split a node.fractionFeaturesInSplit
- The fraction of features available in each split.impurity
- Impurity measure to determine split quality. See LabelImpurity
.seed
- The RNG seed.protected AbstractTrainingNode<Label> mkTrainingNode(Dataset<Label> examples, AbstractTrainingNode.LeafDeterminer leafDeterminer)
mkTrainingNode
in class AbstractCARTTrainer<Label>
public TrainerProvenance getProvenance()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.