Learn R Programming

scorecard (version 0.1.0)

woebin_plot: WOE Binning Visualization

Description

woebin_plot create plots of count distribution and bad probability for each bin. The binning informations are generates by woebin.

Usage

woebin_plot(bins, x = NULL, title = "")

Arguments

bins

Binning information generated by woebin.

x

Name vector of x variables. Default NA.

title

String added to the front of plot title, default "".

Value

List of binning plot

See Also

woebin, woebin_ply

Examples

Run this code
# NOT RUN {
# Load German credit data
data(germancredit)

dt1 <- germancredit[, c("creditability", "credit.amount")]

# binning
bins1 <- woebin(dt1, y="creditability")

# binning plot
p1 <- woebin_plot(bins1)

# }
# NOT RUN {
bins <- woebin(germancredit, y="creditability")
plotlist <- woebin_plot(bins)

# save binning plot
for (i in 1:length(plist)) {
  ggplot2::ggsave(
     paste0("./", names(plist[i]), ".png"), plist[[i]],
     width = 15, height = 9, units="cm" )
  }
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab