Create, model, and analyze credit scorecards as follows.
Use screenpredictors
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 the creditscorecard
object.
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
a creditscorecard
object.
You can use optional input arguments for creditscorecard
to specify
scorecard properties such as the response variable and the
GoodLabel
. Perform some initial data exploration when
the creditscorecard
object is created, although data
analysis is usually done in combination with data binning (see step 2). For
more information and examples, see creditscorecard
and step 1 in
Case Study for a Credit Scorecard Analysis.
Create a creditscorecard
object.
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 a creditscorecard
object.
You can use optional input arguments for creditscorecard
to specify
scorecard properties such as the response variable and the
GoodLabel
. Perform some initial data exploration when
the creditscorecard
object is created, although data
analysis is usually done in combination with data binning (see step 2). For
more information and examples, see creditscorecard
and step 1 in
Case Study for a 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 using bininfo
, and visualize
bin information with respect to bin counts and statistics or association
measures such as Weight of Evidence (WOE) using plotbins
. The bins can be modified or
fine-tuned either manually using modifybins
or
with a different automatic binning algorithm using autobinning
. 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.
For more information and examples, see autobinning
, modifybins
, bininfo
,
and plotbins
and step 2 in Case Study for a Credit Scorecard Analysis.
Fit a logistic regression model.
Fit a logistic regression model to the WOE data from the creditscorecard
object.
The fitmodel
function internally
bins the training data, transforms it into WOE values, maps the response
variable so that 'Good'
is 1
,
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, see fitmodel
and step 3 in Case Study for a 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 using fitConstrainedModel
.
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, see displaypoints
and formatpoints
and step 4 in Case Study for a Credit Scorecard Analysis.
Optionally, you can create a compact credit scorecard using
To create a compactCreditScorecard
object, use
compact
to
create a compactCreditScorecard
object. You can then use
the following functions displaypoints
, score
, and probdefault
from the Risk Management
Toolbox with the compactCreditScorecard
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, see score
and step 5 in Case Study for a 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, see probdefault
and
step 6 in Case Study for a 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, see validatemodel
and
step 7 in Case Study for a Credit Scorecard Analysis.
For an example of this workflow, see Case Study for a Credit Scorecard Analysis.
autobinning
| bindata
| bininfo
| creditscorecard
| displaypoints
| fitmodel
| formatpoints
| modifybins
| modifypredictor
| plotbins
| predictorinfo
| probdefault
| score
| setmodel
| validatemodel