Workflow: Creating Scorecard models with the Scorecard block
The Scorecard Model block enables you to create a scorecard model consisting of a set of attributes each with an assigned weighted score (either positive or negative).
The following demonstrates how to use the Scorecard Model block to create a scorecard with a logistic regression model and a WoE Transform block. Two input datasets (loan_data.csv and loan_applications.csv) that contains observations describing a loan and the person taking the loan out, loan_data.csv contains a Default column where loan_applications.csv does not.
- Import the loan_data.csv and loan_applications.csv datasets onto a Workflow canvas using the Text File Import block.
- Expand the Model Training group in the Workflow palette, then click and drag a WoE Transform block onto the Workflow canvas.
- Click the Output port of the loan_applications dataset block and drag a connection towards the Input port of the WoE Transform block.
- Double-click the WoE Transform block to display the WoE Transform Editor view.
- In the WoE Transform Editor view:
- In the Dependent variable drop-down list, select Default.
- In the Target Category drop-down list, select 1 (one).
- In the Unselected Variables list, press and hold CTRL and select the Age, Housing_Situation, Income, Other_Debt, and Sector variables.
- Click Select to move the specified variables to the Selected Variables list.
- Click the Optimisation tab, click Apply optimal binning to all variables.
- Close the WoE Transform Editor view and save the configuration when prompted.
A green execution status is displayed in the Output port of the WoE Transform Working Dataset.
- Click and drag a Logistic Regression block onto the Workflow canvas.
- Click the Output port of the WoE Transform block Working Dataset and drag a connection towards the Input port of the Logistic Regression block.
- Double click the Logistic Regression block to display the Configure Logistic Regression dialog box.
- In the Configure Logistic Regression dialog box:
- In the Dependent variable drop-down list, select Default.
- In the Event drop-down list, select 1 (one).
- In the Unselected Effect Variables list, select the Age_WOE, Housing_Situation_WOE, Income_WOE, Other_Debt_WOE, and Sector_WOE variables.
- Click Select to move the specified variables to the Selected Effect Variables list.
- In the Selected Effect Variables list, clear the Class checkbox for each variable.
- Click the Model Selection tab and in the Method drop-down list, select Forward.
- Click OK to close the Configure Logistic Regression dialog box.
- Click and drag a Scorecard Model block onto the Workflow canvas.
- Click the Output port of the WoE Transform blocknWoE Transform block and drag a connection towards the Input port of the Scorecard Model block. Repeat for the Logistic Regression Model.
- Double click the Scorecard block to display the Scorecard Model view.
- In the Scorecard Model view:
- In Points at base odds enter 500.
- In Points to double the odds enter 60.
- Close the Scorecard Model view and save the configuration when prompted.
- Expand the Scoring group in the Workflow palette, then click and drag a Score block onto the Workflow canvas.
- Click the Output port of the Scorecard Model block and drag a connection towards the Input port of the Score block. Repeat for the loan_applications dataset.
The green execution status of the Score block turns green and the output is populated with the loan applications plus the score for each customer generated by the Scorecard Model block. A score threshold value can then be used in order to accept or reject these loan applications.