The FOREST Procedure
The OUTPUT statement creates an output data table that contains the results of PROC FOREST.
You must specify the following option:
-
OUT=CAS-libref.data-table
-
names the output data table for PROC FOREST to use. You must specify this option before any other options. CAS-libref.data-table is a two-level name, where
- CAS-libref
refers to a collection of information that is defined in the LIBNAME statement and includes the caslib, 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 CAS-libref, see the section Using CAS Sessions and CAS Engine Librefs.
- data-table
specifies the name of the output data table.
You can also specify the following options:
-
COPYVAR=variable
COPYVARS=(variables)
lists one or more variables from the input data table to be transferred to the output data table.
-
ROLE<=name>
-
generates a numeric variable that indicates the role played by each observation in fitting the model. By default, the variable is named _ROLE_. You can add an optional =name to change the name of this generated variable. For each observation, the interpretation of this variable is shown in Table 5.
Table 5: Role Interpretation
| Value | Observation Role |
|---|
| 0 | Not used |
| 1 | Training |
| 2 | Validation |
| 3 | Testing |
If you do not partition the input data by using a PARTITION statement, then the value of the role variable is 1 for all observations.
Last updated: December 09, 2022