Class CARTRegressionTrainer

java.lang.Object
org.tribuo.common.tree.AbstractCARTTrainer<Regressor>
org.tribuo.regression.rtree.CARTRegressionTrainer
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>, DecisionTreeTrainer<Regressor>, SparseTrainer<Regressor>, Trainer<Regressor>, WeightedExamples

public final class CARTRegressionTrainer extends AbstractCARTTrainer<Regressor>
A Trainer that uses an approximation of the CART algorithm to build a decision tree. Trains an independent tree for each output dimension.

See:

 J. Friedman, T. Hastie, & R. Tibshirani.
 "The Elements of Statistical Learning"
 Springer 2001. PDF
 
  • Constructor Details

    • CARTRegressionTrainer

      public CARTRegressionTrainer(int maxDepth, float minChildWeight, float minImpurityDecrease, float fractionFeaturesInSplit, boolean useRandomSplitPoints, RegressorImpurity impurity, long seed)
      Creates a CART Trainer.
      Parameters:
      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.
    • CARTRegressionTrainer

      public CARTRegressionTrainer(int maxDepth, float minChildWeight, float minImpurityDecrease, float fractionFeaturesInSplit, RegressorImpurity impurity, long seed)
      Creates a CART Trainer.

      Computes the exact split point.

      Parameters:
      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.
    • CARTRegressionTrainer

      public CARTRegressionTrainer()
      Creates a CART trainer.

      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.

    • CARTRegressionTrainer

      public CARTRegressionTrainer(int maxDepth)
      Creates a CART trainer.

      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.

      Parameters:
      maxDepth - The maximum depth of the tree.
  • Method Details