woe.binning.plot {woeBinning} | R Documentation |
Visualization of Binning
Description
woe.binning.plot
visualizes the binning solution generated and saved via the woe.binning
or woe.tree.binning
function.
Usage
woe.binning.plot(binning, multiple.plots, plot.range)
Arguments
binning |
Binning information generated from the |
multiple.plots |
In case the binning solution contains several predictor variables they will be visualized via multiple plots (max. four WOE plots per graph window). Use multiple.plots=FALSE to avoid this and to display single plots in separate windows. |
plot.range |
Range of variables that should be plotted in quotes. For example “1:10” will generate WOE plots and one IV plot for the ten variables with the highest IV values, “11:20” for the next ten variables and so on. Just omit this parameter to visualize all binned variables (default). |
Details
For each predictor variable woe.binning.plot
generates a weight of evidence
(WOE) plot. In case of multiple predictors an additional plot with variables ranked
via the information value (IV) will be displayed.
Examples
# Load German credit data
data(germancredit)
df <- germancredit
# Bin all variables of the data frame (apart from the target variable)
# with default parameter settings
binning <- woe.binning(df, 'creditability', df)
# Plot all binned variables as multiple plots
woe.binning.plot(binning)
# Plot only the first four binned variables with the highest IV value
# as multiple plots
woe.binning.plot(binning, plot.range='1:4')
# Plot the binned variables in single plots
woe.binning.plot(binning, multiple.plots=FALSE)