master.scale: Master Scale

Description Usage Arguments Examples

Description

This function creates a master scale that best describes the target variable according to the given parameters.

Usage

1
2
master.scale(data, default_flag, PD, stop.limit = 0,
  min.perc.total = 0.025, min.perc.class = 0.01)

Arguments

data

A data set needs to be specified including PD variable.

default_flag

The default flag need to specified as string.

PD

PD variable need to be specified.

stop.limit

Stops WOE based merging of the predictor's classes/levels in case the resulting information value (IV) decreases more than x percent (e.g. 0.05 = 5 percent) compared to the preceding binning step. stop.limit=0 will skip any WOE based merging. Increasing the stop.limit will simplify the binning solution and may avoid overfitting. Accepted range: 0-0.5; default: 0.1.

min.perc.total

For numeric variables this parameter defines the number of initial classes before any merging is applied. For example min.perc.total=0.05 (5 percent) will result in 20 initial classes. For factors the original levels with a percentage below this limit are collected in a 'miscellaneous' level before the merging based on the min.perc.class and on the WOE starts. Increasing the min.perc.total parameter will avoid sparse bins. Accepted range: 0.0001-0.2; default: 0.05.

min.perc.class

If a column percentage of one of the target classes within a bin is below this limit (e.g. below 0.01=1 percent) then the respective bin will be joined with others. In case of numeric variables adjacent predictor classes are merged. For factors respective levels (including sparse NAs) are assigned to a 'miscellaneous' level. Setting min.perc.class>0 may provide more reliable WOE values. Accepted range: 0-0.2; default: 0, i.e. no merging with respect to sparse target classes is applied.

Examples

1
master.scale(example_data, "default_f","Probability")

ayhandis/creditR documentation built on May 9, 2019, 8:41 a.m.