Scoring Models

In this exercise, you create a scoring task that is used to run the score code of a model and produce scoring results. You use the results to determine the scoring accuracy and to analyze the model performance. The scoring task uses data from a scoring task input table, and then generates the results in a scoring task output table.

Create a Scoring Task

  1. Expand the 2011 version, right-click the Scoring folder and select New Scoring Task. The New Scoring Task wizard appears.
  2. Specify the following options and click Next:
    Name
    enter M1 for the scoring task name.
    Description
    enter test1.
    Model
    select Model 1. This model controls the available values for the input and output tables.
    Scoring task type
    select Test.
    Tip
    A best practice is to start all scoring tasks with Test selected. The results of a scoring task when it is run as type Test are not overwritten. You can change the type to Production after you are satisfied with the scoring task results and when the model is ready for production.
    Create a new Scoring Task
  3. Verify that the output variables are mapped to the model variables. The variable mapping is as follows:
    Output Variable
    Model Variable
    P_0
    P_0
    posterior
    P_1
    age
    age
    prediction
    I_bad
    gender
    gender
    custKey
    custKey
    numCards
    numCards
    everDefault
    everDefault
    Click Finish.
  4. Select the M1 scoring task to examine its properties. The value for Date Modified is today's date. To change the scoring task name or model input and output tables, you must create a new scoring task.

Execute a Scoring Task

  1. Verify that you have mapped the model output variables to the scoring task output variables. For more information, see Map Model Variables to Project Variables.
  2. Validate the input variables. Expand the Scoring folder, select the M1 scoring task and click the Quick Map Check button toolbar button. Examine the results of Quick Check, and then click OK.
  3. Right-click the M1 scoring task and select Execute.
  4. When the information dialog box confirms that the report was created successfully, click Close. To view the results, click the Results tab and click Result Set.
    Results from executing a scoring task
    If the scoring task was not successful, then review the Log tab for error messages.
  5. Click the Graphs tab to graph the results.
    1. Click Graph Wizard, select Histogram, and then click Next.
    2. In the upper right corner, click Use default assignments and then click Next.
    3. Click the Column name box and select age.
    4. Click the Operator box and select Greater than.
    5. In the Value field, enter 50. Click Next.
    6. In the Title field of the Chart Titles page, type M1 Age. Click Next and then click Finish.
      Here is the histogram on the Results tab:
      Histogram in the Execute window.
  6. Expand the M1 scoring task to verify that four content files were saved and that the value for Date Modified is today's date.
    Here is the Scoring folder and the files for the M1 scoring task:
    Scoring folder M1 task files

Update the Life Cycle (Optional)

To update the Development milestone, follow these steps:
  1. In the Delinquency project, expand 2011then selectLife Cyclethen selectDevelopment.
  2. Select the Score models task. Click the Status box and select Completed.
  3. Select Score models. The Completed Date and Completed By fields have been updated with today's date and your user ID.
  4. Click the Life Cycle node to examine its properties. The value for Modification Date is today's date. The Development property displays a bar chart that shows the percentage of completed tasks for this milestone.
    The life cycle status of the Develop milestone.

Update the Workflow Process (Optional)

To complete the activities in the associated workflow process, follow these steps:
  1. Click My Workflow Inbox from the SAS Model Manager main window to view the workflow process activities in your workflow inbox. Workflow Console is launched in a Web browser, and displays the Activities category view.
    Note: The list displays only the activities for which you are the actual owner or are assigned as a potential owner, and that have the state of Started.
  2. From the Activities category view, select an activity name, and click Claim the activity to claim an activity.
    Note: You can select an activity name and click Release the activity to release an activity that you had previously claimed.
  3. (Optional) Enter a property value or change an existing property value in the Properties pane.
  4. (Optional) Add a comment to the activity using the Comments pane.
  5. Select a status value to complete the activity. The workflow process continues to the next activity.
    Activity Status Menu
  6. Repeat steps 2 through 5 for the activities that you completed during this tutorial.
Note: For more information, see Tutorial 10: Using Workflow Console.