The HPFOREST Procedure

SCORE Statement

  • SCORE OUT=libref.SAS-data-set <score-options> ;

The SCORE statement applies the forest model to the training data and outputs a data set that contains the ID variables that are specified in the ID statement in addition to predictions, residuals, and decisions.

The prediction variables depend on the measurement type of the target variable in the model. For a target that has an interval measurement level, a single prediction variable is generated. For each level of the target that has a nominal measurement level, a posterior probability variable is generated in addition to the final predicted level. The names of the variables are constructed using the rules that are explained in the SAS Enterprise Miner product documentation.

When PROC HPFOREST runs with concurrent threads, the SCORE statement rearranges the observations. An ID variable is needed to correctly merge the output data with other variables from the input data set.

You must specify the output data set with the OUT= option.

OUT=libref.SAS-data-set

names the output data set to contain the scored data.

You can also specify the following score-options:

MAXDEPTH=<n>

produces predictions from trees that are pruned to a depth of n. The trees are not truncated by default.

NTREES=<n>

produces predictions from the first n trees only. If the option is omitted then PROC HPFOREST uses all the trees in the model for predictions. Scoring with fewer trees can sometimes increase the speed without significantly reducing the accuracy.

Last updated: May 25, 2022