Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

woebin_adj

WOE Binning Adjustment


Description

woebin_adj interactively adjust the binning breaks.

Usage

woebin_adj(dt, y, bins, adj_all_var = TRUE, special_values = NULL,
  method = "tree", save_breaks_list = NULL, count_distr_limit = 0.05,
  to = "breaks_list", ...)

Arguments

dt

A data frame.

y

Name of y variable.

bins

A list of data frames. Binning information generated from woebin.

adj_all_var

Logical, whether to show variables have monotonic woe trends. Defaults to TRUE

special_values

The values specified in special_values will in separate bins. Defaults to NULL.

method

Optimal binning method, it should be "tree" or "chimerge". Defaults to "tree".

save_breaks_list

A string. The file name to save breaks_list. Defaults to None.

count_distr_limit

The minimum count distribution percentage. Accepted range: 0.01-0.2; Defaults to 0.05. This argument should be the same with woebin's.

to

Adjusting bins into breaks_list or bins_list. Defaults to breaks_list.

...

Additional parameters.

Value

A list of modified break points of each x variables.

See Also

Examples

## Not run: 
# Load German credit data
data(germancredit)

# Example I
dt = germancredit[, c("creditability", "age.in.years", "credit.amount")]
bins = woebin(dt, y="creditability")
breaks_adj = woebin_adj(dt, y="creditability", bins)
bins_final = woebin(dt, y="creditability",
                    breaks_list=breaks_adj)

# Example II
binsII = woebin(germancredit, y="creditability")
breaks_adjII = woebin_adj(germancredit, "creditability", binsII)
bins_finalII = woebin(germancredit, y="creditability",
                    breaks_list=breaks_adjII)

## End(Not run)

scorecard

Credit Risk Scorecard

v0.3.2
MIT + file LICENSE
Authors
Shichen Xie [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.