The TREESPLIT Procedure
Primary and Surrogate Splitting Rules
During training, PROC TREESPLIT creates a primary splitting rule for each nonterminal node by examining all the node’s observations’ variables and their values and calculating which variable and which of its values to split on such that the observations within each resulting child node are as similar as possible. If you specify a value, x, for the NSURROGATES= option, then PROC TREESPLIT creates x surrogate rules in a similar fashion, each time using a different variable that has a similar predictive ability. The TREESPLIT procedure uses the method of Breiman et al. (1984) to determine surrogate rules. Surrogate rules are ordered by agreement, which is measured by the proportion of observations that have a nonmissing value in the rule’s predictor variable that two rules assign to the same branch. For example, if the primary splitting rule assigns 100 observations to a child node, surrogate rule A assigns 40 observations to the same child node, and surrogate rule B assigns 50 observations to the same child node, then surrogate rule B is applied before surrogate rule A. Surrogate rules enable you to make better use of the data.
During scoring, the primary and surrogate splitting rules are applied as follows:
The primary splitting rule is applied if the primary rule’s variable is not missing; otherwise,
The surrogate rule that has the highest agreement with the primary rule is applied if the first surrogate rule’s variable is not missing; otherwise,
Each subsequent splitting rule (ordered by agreement) is applied if the preceding rule has a missing value.
If all of the surrogate rules’ variables are missing, then the default splitting rule (as specified in the ASSIGNMISSING= option) is used. The default splitting rule enables all data to be scored even if the primary rule and all surrogate rules cannot be used on a particular observation.
Table 21.5 shows an example set of rules for a particular node in a decision tree where X, Y, and Z are three continuous predictors.
Table 21.5: Example of Splitting Rules
By default, NSURROGATES=0. If a variable is used as a surrogate, you can see exactly how it is used in the SAS DATA step code that is generated when you specify the CODE statement.