SUPERLEARNER Procedure

CROSSVALIDATION Statement

  • CROSSVALIDATION <options>;

The CROSSVALIDATION statement controls details about the k-fold cross-validation process. If you omit this statement, PROC SUPERLEARNER uses an internal algorithm to determine the number of folds. For more information about the internal algorithm, see the section K-Fold Cross-Validation.

You can specify the following options:

KFOLD=n

specifies the number of partition folds in cross-validation, where n is an integer between 2 and the number of observations that are used for training, inclusive. If you omit this option, the value of n is determined by the process described in the section K-Fold Cross-Validation.

STRATVAR=variable

specifies a categorical variable for stratified cross-validation. This option is valid only if the number of observations in each class of the variable is larger than the number of folds. For more information about stratified cross-validation, see the section K-Fold Cross-Validation.

Last updated: June 22, 2026