
woebin_plot
create plots of count distribution and bad probability for each bin. The binning informations are generates by woebin
.
woebin_plot(bins, x = NULL, title = NULL, show_iv = TRUE)
A list of data frames. Binning information generated by woebin
.
Name of x variables. Default is NULL. If x is NULL, then all columns except y are counted as x variables.
String added to the plot title. Default is NULL.
Logical. Default is TRUE, which means show information value in the plot title.
A list of binning graphics.
# NOT RUN {
# Load German credit data
data(germancredit)
# Example I
bins1 = woebin(germancredit, y="creditability", x="credit.amount")
p1 = woebin_plot(bins1)
print(p1)
# }
# NOT RUN {
# Example II
bins = woebin(germancredit, y="creditability")
plotlist = woebin_plot(bins)
print(plotlist$credit.amount)
# # save binning plot
# for (i in 1:length(plotlist)) {
# ggplot2::ggsave(
# paste0(names(plotlist[i]), ".png"), plotlist[[i]],
# width = 15, height = 9, units="cm" )
# }
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab