GPCLASS Procedure

OUTPUT Statement

  • OUTPUT OUT=libref.data-table <option>;

The OUTPUT statement writes the classification score of each observation to the output data table that you specify in the OUT= option. This information includes the variables that you specify in the COPYVARS= option and four new variables: _I_TARGET_ (the predicted class label of the target variable), _P_TARGETCLASS0_(the predicted class probability for class 0), _P_TARGETCLASS1_(the predicted class probability for class 1), and _P_VAR_ (the variance value of the prediction). For more information, see the section CAS Table Output.

You must specify the following option:

OUT=libref.data-table

names the output data table for PROC GPCLASS to use. You must specify this option before any other options. libref.data-table is a two-level name, where

libref

refers to a collection of information that is defined in the LIBNAME statement and includes the library, which includes a path to where the data table is to be stored, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about libref, see the section Using CAS Sessions and CAS Engine Librefs.

data-table

specifies the name of the output data table.

The output data table contains the scored data. When you specify this option, all variables that you specify in the COPYVARS= option are added to the specified output data table.

You can also specify the following option:

COPYVAR=variable
COPYVARS=(variables)

lists one or more variables from the input data table that are transferred to the scored output data table, provided that the output data table produces one or more records per input observation. By default, PROC GPCLASS does not transfer any variables from the input data table to the output data table. The COPYVARS= option accepts numeric and character variables. You can also use the COPYVARS=(_ALL_) option to include all the input variables.

Last updated: August 06, 2026