woebin_adj
interactively adjust the binning breaks.
woebin_adj(dt, y, bins, breaks_list = NULL, adj_all_var = TRUE,
to = "breaks_list", save_as = NULL, ...)
A data frame.
Name of y variable.
A list of data frames. Binning information generated from woebin
.
List of break points, Defaults to NULL. If it is not NULL, variable binning will based on the provided breaks.
Logical, whether to show variables have monotonic woe trends. Defaults to TRUE
Adjusting bins into breaks_list or bins_list. Defaults to breaks_list.
A string. The file name to save breaks_list. Defaults to None.
Additional parameters.
A list of modified break points of each x variables.
if (FALSE) {
# 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 adjust two variables' breaks in brklst
binsII = woebin(germancredit, y="creditability", save_as = 'breaks')
brklst = source('breaks.R')$value
# update break list file
brklst_adj = woebin_adj(germancredit, "creditability", binsII[1:2],
breaks_list = brklst, save_as = 'breaks')
}