Creating Scoring Task Input and Output Tables

About Scoring Task Input and Output Tables

The scoring task input table is a data table whose input is used by the scoring task to score a single model. The scoring task input table must contain the variables and input data for the variables that the model requires. Typically, a scoring table is identical to its corresponding train table except that the target variables in the train table are not included in the scoring table.
A scoring task output table is a prototype table that defines one or more input and output variables whose values contain the scoring results. You can create a scoring output table using the Create Output Table function directly from the model in the Project Tree or you can write and execute a DATA step. If you create the table using the Project Tree, SAS Model Manager registers the table in the SAS Metadata Repository or saves the table to a library on a local Workspace Server or network drive. You can view the table in the Data Sources category view of SAS Model Manager. After SAS Model Manager creates the table, the table can be selected as the output table for subsequent scoring tasks. If you create the scoring output table using a DATA step, you must register the table in the SAS Metadata Repository using SAS Management Console or ensure that the table resides in a library that is defined to SAS Model Manager.
Depending on the mode in which a scoring task is run, the scoring task output table might be used as the results table. A SAS Model Manager scoring task can run in test mode, which is the default mode, or it can run in production mode. In both test mode and production mode, a scoring task output table is used by the scoring task to define the structure of the scoring results table. When the task runs, it creates a scoring results table. In test mode, the scoring results table is stored in the SAS Model Manager model repository, and you view the table under the scoring task node in the version Scoring Tasks folder. The scoring task output table is not updated in test mode. In production mode, the contents of the scoring task output table are replaced by the contents of the scoring results table. The scoring results table is not stored in the SAS Model Manager model repository.

Create a Scoring Task Input Table

This DATA step creates a scoring task input table from customer data, keeping 500 rows from the train table:
data hmeqtabl.scorein;
   set hmeqtabl.customer (obs=500);
   keep mortdue reason delinq debinc yoj value ninq job clno derog clage loan;
run;

Create a Scoring Task Output Table

You can create a scoring output table using the Create Output Table window that you open from the Project Tree. The Create Output Table window provides a graphical interface for you to select the variables that you want to include in your scoring output table. If the library that you select in the Create Output Table window is a folder in the SAS Metadata Repository, SAS Model Manager registers the table in the repository. You can view the table in the Data Sources category view of SAS Model Manager. For information, see Create Scoring Output Tables.
You can also create a scoring task output table using a DATA step to keep or drop variables from the train table.
The input variables that you might want to keep in the output data set are key variables for the table. Key variables contain unique information that distinguishes one row from another. An example would be a customer ID number.
This DATA step keeps the input variable CLNO, the client number, which is the key variable, and the output variable SCORE:
data hmeqtabl.scoreout;
   length clno 8 score 8;
run;