Credit Scorecard Modeling Workflow
Create, model, and analyze credit scorecards as follows.
Use
screenpredictors
(Risk Management Toolbox) from Risk Management Toolbox™ to pare down a potentially large set of predictors to a subset that is most predictive of the credit score card response variable. Use this subset of predictors when creating thecreditscorecard
object. In addition, you can use Threshold Predictors (Risk Management Toolbox) to interactively set credit scorecard predictor thresholds using the output fromscreenpredictors
(Risk Management Toolbox).Create a
creditscorecard
object for credit scorecard analysis by specifying “training” data in table format. The training data, sometimes called the modeling view, is the result of multiple data preparation tasks (see About Credit Scorecards) that must be performed before creating acreditscorecard
object.You can use optional input arguments for
creditscorecard
to specify scorecard properties such as the response variable and theGoodLabel
. Perform some initial data exploration when thecreditscorecard
object is created, although data analysis is usually done in combination with data binning (see step 2). For more information and examples, seecreditscorecard
and step 1 in Case Study for Credit Scorecard Analysis.Create a
creditscorecard
object using training data.When you create a
creditscorecard
object for credit scorecard, you can specify “training” data in table format. The training data, sometimes called the modeling view, is the result of multiple data preparation tasks (see About Credit Scorecards) that must be performed before creating acreditscorecard
object.You can use optional input arguments for
creditscorecard
to specify scorecard properties such as the response variable and theGoodLabel
. Perform some initial data exploration when thecreditscorecard
object is created, although data analysis is usually done in combination with data binning (see step 2). For more information and examples, seecreditscorecard
and step 1 in Case Study for Credit Scorecard Analysis.Bin the data.
Perform manual or automatic binning of the data loaded into the
creditscorecard
object.A common starting point is to apply automatic binning to all or selected variables using
autobinning
, report usingbininfo
, and visualize bin information with respect to bin counts and statistics or association measures such as Weight of Evidence (WOE) usingplotbins
. The bins can be modified or fine-tuned either manually usingmodifybins
or with a different automatic binning algorithm usingautobinning
. Bins that show a close-to-linear trend in the WOE are frequently desired in the credit scorecard context.Alternatively, with Risk Management Toolbox, you can use the Binning Explorer app to interactively bin. The Binning Explorer enables you to interactively apply a binning algorithm and modify bins. For more information, see Binning Explorer (Risk Management Toolbox).
For more information and examples, see
autobinning
,modifybins
,bininfo
, andplotbins
and step 2 in Case Study for Credit Scorecard Analysis.Fit a logistic regression model.
Fit a logistic regression model to the WOE data from the
creditscorecard
object. Thefitmodel
function internally bins the training data, transforms it into WOE values, maps the response variable so that'Good'
is1
, and fits a linear logistic regression model.By default,
fitmodel
uses a stepwise procedure to determine which predictors should be in the model, but optional input arguments can also be used, for example, to fit a full model. For more information and examples, seefitmodel
and step 3 in Case Study for Credit Scorecard Analysis.Alternatively, you can apply equality, inequality, or bound constraints to fit a logistic regression model to the WOE data from the
creditscorecard
object usingfitConstrainedModel
.Review and format credit scorecard points.
After fitting the logistic model, use
displaypoints
to summarize the scorecard points. By default, the points are unscaled and come directly from the combination of Weight of Evidence (WOE) values and model coefficients.The
formatpoints
function lets you control scaling and rounding of scorecard points. For more information and examples, seedisplaypoints
andformatpoints
and step 4 in Case Study for Credit Scorecard Analysis.Optionally, you can create a compact credit scorecard using
To create a
compactCreditScorecard
object, usecompact
to create acompactCreditScorecard
object. You can then use the following functionsdisplaypoints
(Risk Management Toolbox),score
(Risk Management Toolbox), andprobdefault
(Risk Management Toolbox) from the Risk Management Toolbox with thecompactCreditScorecard
object..Score the data.
The
score
function computes the scores for the training data.An optional data input can also be passed to
score
, for example, validation data. The points per predictor for each customer are also provided as an optional output. For more information and examples, seescore
and step 5 in Case Study for Credit Scorecard Analysis.Calculate the probability of default for credit scorecard scores.
The
probdefault
function to calculate the probability of default for training data.In addition, you can compute likelihood of default for a different dataset (for example, a validation data set) using the
probdefault
function. For more information and examples, seeprobdefault
and step 6 in Case Study for Credit Scorecard Analysis.Validate the credit scorecard model.
Use the
validatemodel
function to validate the quality of the credit scorecard model.You can obtain the Cumulative Accuracy Profile (CAP), Receiver Operating Characteristic (ROC), and Kolmogorov-Smirnov (KS) plots and statistics for a given dataset using the
validatemodel
function. For more information and examples, seevalidatemodel
and step 7 in Case Study for Credit Scorecard Analysis.
For an example of this workflow, see Case Study for Credit Scorecard Analysis.
See Also
creditscorecard
| autobinning
| bininfo
| predictorinfo
| modifypredictor
| modifybins
| bindata
| plotbins
| fitmodel
| displaypoints
| formatpoints
| score
| setmodel
| probdefault
| validatemodel