Interface DecisionTreeSurrogateMethod

All Superinterfaces:
Serializable
All Known Implementing Classes:
ALACART

public interface DecisionTreeSurrogateMethod extends Serializable
Methods to account for missing values in predictor variables. These methods are used by objects that extend the DecisionTree abstract class and implement the DecisionTreeSurrogateMethod interface. When predicting a new observation, if the value of the split variable is missing, the prediction function uses surrogate split variables and associated rules, in order of selection. If none can be applied because of continued missing values, the prediction will be missing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSurrogates(Tree tree, double[] surrogateInfo)
    Adds the surrogate information to the tree.
    int
    Indicates the number of surrogate splits.
    double[]
    Returns the surrogate split information.
    void
    Indicates the number of surrogate splits.
  • Method Details

    • addSurrogates

      void addSurrogates(Tree tree, double[] surrogateInfo)
      Adds the surrogate information to the tree.
      Parameters:
      tree - a Tree object, containing the decision tree structure
      surrogateInfo - a double array containing the surrogate split information
    • getNumberOfSurrogateSplits

      int getNumberOfSurrogateSplits()
      Indicates the number of surrogate splits.
      Returns:
      an int specifying the number of surrogate splits
    • setNumberOfSurrogateSplits

      void setNumberOfSurrogateSplits(int nSplits)
      Indicates the number of surrogate splits.
      Parameters:
      nSplits - an int specifying the number of surrogate splits that should occur

    • getSurrogateInfo

      double[] getSurrogateInfo()
      Returns the surrogate split information.
      Returns:
      a double array containing the surrogate split information