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 and you can view the table in the Data Sources perspective 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.

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. SAS Model Manager registers the table in the SAS Metadata Repository and then you can view the table in the Data Sources perspective 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;