woebin_adj: WOE Binning Adjustment

Description Usage Arguments Value See Also Examples

View source: R/woebin.R

Description

woebin_adj interactively adjust the binning breaks.

Usage

1
2
woebin_adj(dt, y, bins, adj_all_var = TRUE, special_values = NULL,
  method = "tree", save_breaks_list = NULL, count_distr_limit = 0.05)

Arguments

dt

A data frame.

y

Name of y variable.

bins

A list or data frame. Binning information generated from woebin.

adj_all_var

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

special_values

The values specified in special_values will in separate bins. Default is NULL.

method

Optimal binning method, it should be "tree" or "chimerge". Default is "tree".

save_breaks_list

A string. The file name to save breaks_list. Default is None.

count_distr_limit

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

Value

A list of modified break points of each x variables.

See Also

woebin, woebin_ply, woebin_plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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 documentation built on Jan. 14, 2019, 5:04 p.m.