Learn R Programming

scorecard (version 0.1.5)

woebin_adj: WOE Binning Adjustment

Description

woebin_adj interactively adjust the binning breaks.

Usage

woebin_adj(bins, dt, y, all_var = FALSE, count_distr_limit = 0.05)

Arguments

bins

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

dt

A data frame.

y

Name of y variable.

all_var

Logical, default FALSE. It means whether to adjust all variables' binning breaks.

count_distr_limit

The count_distr limit to adjust binning breaks, default 0.05.

See Also

woebin, woebin_ply, woebin_plot

Examples

Run this code
# 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(bins, dt, y="creditability")
bins_final = woebin(dt, y="creditability",
                    breaks_list=breaks_adj)

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

Run the code above in your browser using DataLab