Definitions
Notation
- the number of attributes,
- the attributes,
,
- the number of levels for the attribute
,
- the number of a level for the attribute
,
.
The first step in building scoring card is to determine levels for attributes.
For every attribute
the algorithm sets
-- the number of levels.
If an attribute is categorical the number of levels equals the
number of different values (different categories).
For numerical attributes the algorithm selects intervals.
In both cases two extra levels ('No Answer' and 'No information') are added by defaul:
In the case when any of the two additional levels is not necessary, it can be deleted manually.
In the process of building a scoring card, the algorithm calculates the number of points for every level of every attribute. Two algorithms for calculating points are available: Max Points Scaling and PDO Scaling. Moreover, additional scoring card characteristics, the BeingGood and Weight of Evidence parameters are also caluclated.
The main component of the formula for calculating the points for
the
-th
level of attribute
is the contribution coefficient
. These coefficients are
calculated differently for categorical and numerical attributes.
Priot to the calculation, every categorical attribute
is binarized into
binary variables. Let
denote the coefficient obtained from
the logistic regression model for the variable (obtained from binarization)
corresponding to the
-th
level of the attribute
.
The contribution coefficient for the
-th
level of the categorical attribute
is calculated as:

Additionally, for the No Information level

where
is the number of records in the training dataset
for which the value of the attribute
belongs to the
-th
level,
is the number of records in the training dataset
for which the value of the attribute
is specified (i.e. non-missing).
Let
denote the average value of the attribute
in the training dataset,
and
the average value of the
-th
level of the attribute
. In the case when the level is empty (i.e. no values
fall into it), we put

where
and
denotes the ends of the interval which forms the
-th level.
When the level is empty and one of the ends of the corresponding interval is equal to
, the value of
is set to the othe end of the interval.
Let
denote the coefficient obtained from the logistic regression model for the attribute
.
The contribution coefficient for the
-th level of the attribute
is calculated as

and

The formula for the contribution of the No Information level of a numerical variable is, in fact, similar, to the one for categorical variables. It can be shown that:

For the standard levels and the No Information level the algorithm
first calculates the non-normalized points and later uses the
non-normalized points for all levels of a given attribute to calculate the normalized points
for each level. Below we assume that
corresponds to the No Information
level of the attribute
.
For the level
of the attribute
the non-normalized points (
) are calculated according to the formula

where

is an input parameter equal to the number of points assigned to the
strongest attribute,
if the SwapPoints
paramter of the algorithm settings
is set to true, and
if the
SwapPoints> paramter is set to false.
The normalized points for any level with the exception of No Answer level are calculated according to the formula

For the No Answer level the following formula is used

if the Maximum for NoAnswer paramater of the algorithm settings is set to true, and

if the Maximum for NoAnswer paramater is set to false.
The PDO (Points to Double the Odds) Scaling algorithm depends on three parameters: odds, atPoints and PDO. The points for various levels are calculated so that the score of atPoints corresponds to the odds (of obtaining a positive target value) of odds : 1 and these odds double with every increase of the total score by PDO points.
Priot to the calculation, every categorical attribute
is binarized into
binary variables. Let
denote the coefficient obtained from
the logistic regression model for the variable (obtained from binarization)
corresponding to the
-th
level of the attribute
.
The contribution coefficient for the
-th
level of the categorical attribute (other than NoInformation
and NoAnswer)
is calculated as:

where
is the
Weight of Evidence parameter.
Additionally

For a given attribute
let
denote the coefficient obtained from logistic regression.
For any level
,
of this attribute which is other then the
NoInformation and NoAnswer
the contribution is calculated according to the formula

where
is the
Weight of Evidence parameter.
The contribution for the NoInformation level is
calculated as

Let
denote the number of attributes. Prior to point assignment
the following quantities are calculated:


The the points for the attribute
and its level
(other than NoAnswer)
are calculated as

where
is the intercept term obtained from
from logistic regression and
if the
SwapPoints> paramter is set to false.
For the No Answer level the following formula is used

if the Maximum for NoAnswer paramater of the algorithm settings is set to true, and

if the Maximum for NoAnswer paramater is set to false.
The BeingGood statistic is calculated for every level of every attribute according to the following formula:

where
is the
number of records in the training dataset for which the
value of the attribute
belongs to the
-th
level and is not the positive target value.
is the
number of records in the training dataset for which the
value of the attribute
belongs to the
-th
level and is the positive target value.
is the total
number of records in the training dataset for which the
value of the attribute
is not
the positive target value.
is the total
number of records in the training dataset for which the
value of the attribute
is
the positive target value.
The Weight of Evidence parameter is calculated for every level of every attribute according to the formula
