Creating Scoring Input and Output Tables

About Scoring Input and Output Tables

The scoring input table is a data table whose input is used by the scoring test to score a single model. The scoring 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 output table contains the data that is produced when you execute a scoring test. You can provide a scoring output table or you can create a scoring output table definition in SAS Model Manager. When a scoring test is executed, SAS Model Manager uses the scoring output table definition to create the scoring output table. The name of the scoring output table definition is used as the name of the scoring output table.
You can create a scoring output table definition by using the Create a Scoring Output Table function on the Models page. In the Create a Scoring Output Table window, you select variables from a scoring input table as well as variables from the model’s output. The variables in the Input Variables table are variables from the scoring input table if one is specified for the Default scoring input table property for a project or model property. Otherwise, the Input Variables table is empty. The Output Variables that appear in the window are model output variables. You use the variables from both tables to create the scoring output table.
SAS Model Manager saves the table definition as metadata in the SAS Metadata Repository. The location of the metadata is defined by the SAS library that you specify when you create the output table definition. After SAS Model Manager creates the table definition, the table can be selected as the output table for subsequent scoring tests.
A SAS Model Manager scoring test can run in test mode, which is the default mode, or it can run in production mode. When the test runs, it populates a scoring output table. In test mode, the scoring output table is stored in the SAS Model Manager model repository. You view the table under the scoring test on the project’s Scoring page. In production mode, if the scoring output table is a table that you provided, that table is updated. If you created a scoring test output definition, the scoring output table is located in the designated SAS library that you specified when you created the table definition in the Create a Scoring Output Table window. The production scoring output table is not stored in the SAS Model Manager repository.

Create a Scoring Input Table

This DATA step creates a scoring test 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 Output Table

You can create a scoring output table using the Create a Scoring Output Table window that you open from the project’s Models page. The Create a Scoring Output Table window enables you to select the variables that you want to include in your scoring output table. If the library that you select in the Create a Scoring 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 category view of SAS Model Manager. For information, see Create Scoring Output Tables.
You can also create a scoring 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;
Last updated: June 12, 2017