public final class CARTRegressionTrainer extends AbstractCARTTrainer<Regressor>
AbstractCARTTrainer.AbstractCARTTrainerProvenance
fractionFeaturesInSplit, maxDepth, MIN_EXAMPLES, minChildWeight, rng, seed, trainInvocationCounter
DEFAULT_SEED
Constructor and Description |
---|
CARTRegressionTrainer()
Creates a CART trainer.
|
CARTRegressionTrainer(int maxDepth)
Creates a CART trainer.
|
CARTRegressionTrainer(int maxDepth,
float minChildWeight,
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) |
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, postConfig, train
public CARTRegressionTrainer(int maxDepth, float minChildWeight, float fractionFeaturesInSplit, RegressorImpurity impurity, long seed)
maxDepth
- maxDepth The maximum depth of the tree.minChildWeight
- minChildWeight The minimum node weight to consider it for a split.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()
MeanSquaredError
, uses
all the features, and sets the minimum number of examples in a leaf to AbstractCARTTrainer.MIN_EXAMPLES
.public CARTRegressionTrainer(int maxDepth)
MeanSquaredError
, 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.protected AbstractTrainingNode<Regressor> mkTrainingNode(Dataset<Regressor> examples)
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.