Package com.imsl.datamining.decisionTree
Interface DecisionTreeSurrogateMethod
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ALACART
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 TypeMethodDescriptionvoidaddSurrogates(Tree tree, double[] surrogateInfo) Adds the surrogate information to the tree.intIndicates the number of surrogate splits.double[]Returns the surrogate split information.voidsetNumberOfSurrogateSplits(int nSplits) Indicates the number of surrogate splits.
-
Method Details
-
addSurrogates
Adds the surrogate information to the tree.- Parameters:
tree- aTreeobject, containing the decision tree structuresurrogateInfo- adoublearray containing the surrogate split information
-
getNumberOfSurrogateSplits
int getNumberOfSurrogateSplits()Indicates the number of surrogate splits.- Returns:
- an
intspecifying the number of surrogate splits
-
setNumberOfSurrogateSplits
void setNumberOfSurrogateSplits(int nSplits) Indicates the number of surrogate splits.- Parameters:
nSplits- anintspecifying the number of surrogate splits that should occur
-
getSurrogateInfo
double[] getSurrogateInfo()Returns the surrogate split information.- Returns:
- a
doublearray containing the surrogate split information
-