Learn R Programming

scorecard (version 0.1.9)

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")

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, default is TRUE. If it is TRUE, all variables need to adjust binning breaks, otherwise, only include the variables that have more then one inflection point.

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".

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(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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab