Syntax

Description

PointsInfo = displaypoints(sc)
returns a table of points for all bins of all predictor variables used in the
creditscorecard object after a linear logistic regression
model is fit using fitmodel to the Weight of
Evidence data. The PointsInfo table displays information on
the predictor name, bin labels, and the corresponding points per bin.

[PointsInfo,MinScore,MaxScore]
= displaypoints(sc)
returns a table of points for all bins of all predictor variables used in the
creditscorecard object after a linear logistic regression
model is fit (fitmodel) to the Weight of
Evidence data. The PointsInfo table displays information on
the predictor name, bin labels, and the corresponding points per bin and
displaypoints. In addition, the optional
MinScore and MaxScore values are
returned.

Examples

Display Unscaled Points

This example shows how to use displaypoints after a model is fitted to compute the unscaled points per bin, for a given predictor in the creditscorecard model.

Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011). Use the 'IDVar' argument in the creditscorecard function to indicate that 'CustID' contains ID information and should not be included as a predictor variable.

displaypoints always displays a '<missing>' bin for each predictor. The value of the '<missing>' bin comes from the initial creditscorecard object, and the '<missing>' bin is set to NaN whenever the scorecard model has no information on how to assign points to missing data.

To configure the points for the '<missing>' bin, you must use the initial creditscorecard object. For predictors that have missing values in the training set, the points for the '<missing>' bin are estimated from the data if the 'BinMissingData' name-value pair argument is set to true using creditscorecard. When the 'BinMissingData' parameter is set to false, or when the data contains no missing values in the training set, use the 'Missing' name-value pair argument in formatpoints to indicate how to assign points to the missing data.

For the 'CustAge' and 'ResStatus' predictors, there is missing data (NaNs and <undefined>) in the training data, and the binning process estimates a WOE value of -0.15787 and 0.026469 respectively for missing data in these predictors, as shown above.

Use fitmodel to fit a logistic regression model using Weight of Evidence (WOE) data. fitmodel internally transforms all the predictor variables into WOE values, using the bins found with the automatic binning process. fitmodel then fits a logistic regression model using a stepwise method (by default). For predictors that have missing data, there is an explicit <missing> bin, with a corresponding WOE value computed from the data. When using fitmodel, the corresponding WOE value for the <missing> bin is applied when performing the WOE transformation.

Notice that points for the <missing> bin for CustAge and ResStatus are explicitly shown. These points are computed from the WOE value for the <missing> bin and the logistic model coefficients.

For predictors that have no missing data in the training set, there is no explicit <missing> bin, and by default the points are set to NaN for missing data, and they lead to a score of NaN when running score. For predictors that have no explicit <missing> bin, use the name-value argument 'Missing' in formatpoints to indicate how missing data should be treated for scoring purposes.

Display Scaled Points

This example shows how to use formatpoints after a model is fitted to format scaled points, and then use displaypoints to display the scaled points per bin, for a given predictor in the creditscorecard model.

Points become scaled when a range is defined. Specifically, a linear transformation from the unscaled to the scaled points is necessary. This transformation is defined either by supplying a shift and slope or by specifying the worst and best scores possible. (For more information, see formatpoints.)

Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011). Use the 'IDVar' argument in the creditscorecard function to indicate that 'CustID' contains ID information and should not be included as a predictor variable.

Separate the Base Points From the Total Points

This example shows how to use displaypoints after a model is fitted to separate the base points from the rest of the points assigned to each predictor variable. The name-value pair argument 'BasePoints' in the formatpoints function is a boolean that serves this purpose. By default, the base points are spread across all variables in the scorecard.

Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011). Use the 'IDVar' argument in the creditscorecard function to indicate that 'CustID' contains ID information and should not be included as a predictor variable.

Display Points After Modifying Bin Labels

This example shows how to use displaypoints after a model is fitted and the modifybins function is used to provide user-defined bin labels for a numeric predictor.

Create a creditscorecard object using the CreditCardData.mat file to load the data (using a dataset from Refaat 2011). Use the 'IDVar' argument in the creditscorecard function to indicate that 'CustID' contains ID information and should not be included as a predictor variable.

Compute the Predictor Weights

This example shows how to use a credit scorecard to compute the weights of the predictors. The weights of the predictors are determined from the range of points of each predictor, divided by the total range of points for the scorecard. The points for the scorecard not only take into consideration the betas, but also implicitly the binning of the predictor values and the corresponding weights of evidence.

The binning map or rules for categorical data are summarized in a "category grouping" table, returned as an optional output. By default, each category is placed in a separate bin. Here is the information for the predictor ResStatus.

To group categories 'Tenant' and 'Other', modify the category grouping table cg, so the bin number for 'Other' is the same as the bin number for 'Tenant'. Then use modifybins to update the creditscorecard object.

cg.BinNumber(3) = 2;
sc = modifybins(sc,'ResStatus','Catg',cg);

Display the updated bin information using bininfo. Note that the bin labels has been updated and that the bin membership information is contained in the category grouping cg.

Then use displaypoints with the creditscorecard object to return a table of points for all bins of all predictor variables used in the compactCreditScorecard object. By setting the displaypoints name-value pair argument for 'ShowCategoricalMembers' to true, all the members contained in each individual group are displayed.

Input Arguments

sc — Credit scorecard modelcreditscorecard object

Credit scorecard model, specified as a
creditscorecard object. Use creditscorecard to create
a creditscorecard object.

Name-Value Pair Arguments

Specify optional
comma-separated pairs of Name,Value arguments. Name is
the argument name and Value is the corresponding value.
Name must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN.

'ShowCategoricalMembers' — Indicator for how to display bins labels of categories that were grouped togetherfalse (default) | true or false

Indicator for how to display bins labels of categories that were
grouped together, specified as the comma-separated pair consisting of
'ShowCategoricalMembers' and a logical scalar
with a value of true or false.

By default, when 'ShowCategoricalMembers' is
false, bin labels are displayed as
Group1,
Group2,…,Groupn,
or if the bin labels were modified in creditscorecard, then the
user-defined bin label names are displayed.

If 'ShowCategoricalMembers' is
true, all the members contained in each
individual group are displayed.

Output Arguments

PointsInfo — One row per bin, per predictor, with the corresponding pointstable

One row per bin, per predictor, with the corresponding points, returned as
a table. For example:

Predictors

Bin

Points

Predictor_1

Bin_11

Points_11

Predictor_1

Bin_12

Points_12

Predictor_1

Bin_13

Points_13

...

...

Predictor_1

'<missing>'

NaN (Default)

Predictor_2

Bin_21

Points_21

Predictor_2

Bin_22

Points_22

Predictor_2

Bin_23

Points_23

...

...

Predictor_2

'<missing>'

NaN (Default)

Predictor_j

Bin_ji

Points_ji

...

...

Predictor_j

'<missing>'

NaN (Default)

displaypoints always displays a
'<missing>' bin for each predictor. The value of
the '<missing>' bin comes from the initial creditscorecard object, and
the '<missing>' bin is set to NaN
whenever the scorecard model has no information on how to assign points to
missing data.

To configure the points for the '<missing>' bin, you
must use the initial creditscorecard object. For
predictors that have missing values in the training set, the points for the
'<missing>' bin are estimated from the data if the
'BinMissingData' name-value pair argument for is set
to true using creditscorecard. When the
'BinMissingData' parameter is set to
false, or when the data contains no missing values in
the training set, use the 'Missing' name-value pair
argument in formatpoints to indicate
how to assign points to the missing data.

When base points are reported separately (see formatpoints), the first
row of the returned PointsInfo table contains the base
points.

MinScore — Minimum possible total scorescalar

Minimum possible total score, returned as a scalar.

Note

Minimum score is the lowest possible total score in the
mathematical sense, independently of whether a low score means
high risk or low risk.

MaxScore — Maximum possible total scorescalar

Maximum possible total score, returned as a scalar.

Note

Maximum score is the highest possible total score in the
mathematical sense, independently of whether a high score means
high risk or low risk.

Algorithms

The points for predictor j and bin i are,
by default, given
by

Points_ji = (Shift + Slope*b0)/p + Slope*(bj*WOEj(i))

where
bj is the model coefficient of predictor
j, p is the number of predictors in the model,
and WOEj(i) is the Weight of Evidence (WOE)
value for the i-th bin corresponding to the j-th model
predictor. Shift and Slope are scaling
constants.

When the base points are reported separately (see the formatpoints name-value pair
argument BasePoints), the base points are given
by

Use formatpoints to control the way
points are scaled, rounded, and whether the base points are reported separately. See
formatpoints for more information
on format parameters and for details and formulas on these formatting
options.

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic. By continuing to use this website, you consent to our use of cookies. Please see our Privacy Policy to learn more about cookies and how to change your settings.