The TREESPLIT Procedure

PRUNE Statement

  • PRUNE <prune-method><(prune-options)>;

The PRUNE statement specifies the pruning method and related options.

You can specify the following prune-methods. The default prune-method is COSTCOMPLEXITY.

C45 <(CONFIDENCE=confidence-level)>

requests C4.5 pruning (Quinlan 1993), which is based on the upper confidence limit for the error rate. For more information, see the section Pruning. This pruning method is available only for classification trees (which have a categorical response). PROC TREESPLIT uses the error rate from the training data only.

You can specify the following prune-option:

CONFIDENCE=confidence-level

specifies the pruning confidence level, which must be a positive number in the range of [0, 1]. The default confidence level is 0.25.

COSTCOMPLEXITY <(prune-options)>
CC <(prune-options)>

requests cost-complexity pruning (Breiman et al. 1984; Quinlan 1987; Zhang and Singer 2010). You can specify this pruning method both for classification trees (which have a categorical response) and for regression trees (which have a continuous response).

By default, cost-complexity pruning uses k-fold cross validation. If you specify a validation data set by using the PARTITION statement, PROC TREESPLIT uses the validation data for subtree selection and does not perform k-fold cross validation.

You can specify one the following prune-options:

ALPHA=number

selects the subtree whose cost-complexity value is equal to number instead of using k-fold cross validation. You cannot specify this option with either the KFOLD= or the LEAVES= options.

KFOLD=number

specifies the number of folds for k-fold cross validation. This option is ignored if you specify the PARTITION statement. You can specify this option and the LEAVES=SE value at the same time.

By default, KFOLD=10.

LEAVES=number |ALL |SE

selects the subtree according to one of the following values:

number

selects the subtree that has the number of leaves, or the subtree whose number of leaves is less than and closest to number if no subtree with exactly number of leaves exists, instead of using k-fold cross validation.

ALL

selects the largest tree instead of using k-fold cross validation.

SE

selects the subtree by performing k-fold cross validation and using the Breiman’s 1-SE rule instead of the minimum error rate. You can specify this value and the KFOLD= option at the same time.

OFF
NONE

turns off pruning completely. No pruning is performed, and no pruning plots are generated.

REDUCEDERROR <(prune-options)>
REP <(prune-options)>

requests reduced-error pruning (Quinlan 1986). Reduced-error pruning has two stages: subtree sequence generation and subtree selection. The validation data are used for both stages. The PARTITION statement is required. For more information, see the section Pruning.

PROC TREESPLIT generates a pruning plot that shows the requested error metric as a function of the number of leaves in the subtree.

You can specify the following prune-options:

LEAVES=number |ALL

selects the subtree that has the requested number of leaves, or if no subtree with exactly that number of leaves is available, selects the subtree whose number of leaves is less than and closest to number. When LEAVES=ALL, the largest tree is selected.

By default, PRUNE=COSTCOMPLEXITY.

Last updated: December 21, 2018