public final class CARTRegressionTrainer extends AbstractCARTTrainer<Regressor>
AbstractCARTTrainer.AbstractCARTTrainerProvenance
fractionFeaturesInSplit, maxDepth, MIN_EXAMPLES, minChildWeight, minImpurityDecrease, rng, seed, trainInvocationCounter, useRandomSplitPoints
DEFAULT_SEED
Constructor and Description |
---|
CARTRegressionTrainer()
Creates a CART trainer.
|
CARTRegressionTrainer(int maxDepth)
Creates a CART trainer.
|
CARTRegressionTrainer(int maxDepth,
float minChildWeight,
float minImpurityDecrease,
float fractionFeaturesInSplit,
boolean useRandomSplitPoints,
RegressorImpurity impurity,
long seed)
Creates a CART Trainer.
|
CARTRegressionTrainer(int maxDepth,
float minChildWeight,
float minImpurityDecrease,
float fractionFeaturesInSplit,
RegressorImpurity impurity,
long seed)
Creates a CART Trainer.
|
Modifier and Type | Method and Description |
---|---|
TrainerProvenance |
getProvenance() |
protected AbstractTrainingNode<Regressor> |
mkTrainingNode(Dataset<Regressor> examples,
AbstractTrainingNode.LeafDeterminer leafDeterminer) |
String |
toString() |
TreeModel<Regressor> |
train(Dataset<Regressor> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
Trains a sparse predictive model using the examples in the given data set.
|
getFractionFeaturesInSplit, getInvocationCount, getMinImpurityDecrease, getUseRandomSplitPoints, postConfig, train
public CARTRegressionTrainer(int maxDepth, float minChildWeight, float minImpurityDecrease, float fractionFeaturesInSplit, boolean useRandomSplitPoints, RegressorImpurity impurity, long seed)
maxDepth
- maxDepth The maximum depth of the tree.minChildWeight
- minChildWeight The minimum node weight to consider it for a split.minImpurityDecrease
- The minimum decrease in impurity necessary to split a node.fractionFeaturesInSplit
- fractionFeaturesInSplit The fraction of features available in each split.useRandomSplitPoints
- Whether to choose split points for features at random.impurity
- impurity The impurity function to use to determine split quality.seed
- The RNG seed.public CARTRegressionTrainer(int maxDepth, float minChildWeight, float minImpurityDecrease, float fractionFeaturesInSplit, RegressorImpurity impurity, long seed)
Computes the exact split point.
maxDepth
- maxDepth The maximum depth of the tree.minChildWeight
- minChildWeight The minimum node weight to consider it for a split.minImpurityDecrease
- The minimum decrease in impurity necessary to split a node.fractionFeaturesInSplit
- fractionFeaturesInSplit The fraction of features available in each split.impurity
- impurity The impurity function to use to determine split quality.seed
- The RNG seed.public CARTRegressionTrainer()
Sets the impurity to the MeanSquaredError
, uses
all the features, computes the exact split point, and
sets the minimum number of examples in a leaf to AbstractCARTTrainer.MIN_EXAMPLES
.
public CARTRegressionTrainer(int maxDepth)
Sets the impurity to the MeanSquaredError
, 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.protected AbstractTrainingNode<Regressor> mkTrainingNode(Dataset<Regressor> examples, AbstractTrainingNode.LeafDeterminer leafDeterminer)
mkTrainingNode
in class AbstractCARTTrainer<Regressor>
public TreeModel<Regressor> train(Dataset<Regressor> examples, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
SparseTrainer
train
in interface SparseTrainer<Regressor>
train
in interface Trainer<Regressor>
train
in class AbstractCARTTrainer<Regressor>
examples
- the data set containing the examples.runProvenance
- Training run specific provenance (e.g., fold number).public TrainerProvenance getProvenance()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.