Description Details Binning Functions References Examples
This package generates, visualizes, tabulates and deploys a supervised weight of evidence (WOE) binning of variables.
The package woeBinning automates the process of binning of numeric
variables and factors with respect to a dichotomous target variable.
Additionally, it visualizes the realized binning solution, tabulates it and
deploys it to (new) data. All functions can be used with single variables
or an entire data frame.
woe.binning generates a supervised fine and coarse classing of numeric variables and factors.
woe.tree.binning generates a supervised tree-like segmentation of numeric variables and factors.
woe.binning.plot visualizes the binning solution generated and saved via woe.binning or woe.tree.binning.
woe.binning.table tabulates the binning solution generated and saved via woe.binning or woe.tree.binning.
woe.binning.deploy deploys the binning solution generated and saved via woe.binning or woe.tree.binning to (new) data.
Siddiqi, N. 2006: Credit Risk Scorecards: Developing and Implementing Intelligent Credit Scoring. Hoboken, New Jersey: John Wiley & Sons.
Anderson, R. 2007: The Credit Scoring Toolkit: Theory and Practice for Retail Credit Risk Management and Decision Automation. Oxford / New York: Oxford University Press.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Load German credit data and create subset
data(germancredit)
df <- germancredit[, c('creditability', 'credit.amount', 'duration.in.month',
'savings.account.and.bonds', 'purpose')]
# Bin all variables of the data frame (apart from the target variable)
# with default parameter settings
binning <- woe.binning(df, 'creditability', df)
# Plot the binned variables
woe.binning.plot(binning)
# Tabulate the binned variables
tabulate.binning <- woe.binning.table(binning)
tabulate.binning
# Deploy the binning solution to the data frame
# (i.e. add binned variables and corresponding WOE variables)
df.with.binned.vars.added <- woe.binning.deploy(df, binning,
add.woe.or.dum.var='woe')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.