Description Usage Arguments Value Examples
The function kmn_bin
implements the monotonic binning based on
the k-means clustering
1 | kmn_bin(x, y)
|
x |
A numeric vector |
y |
A numeric vector with 0/1 binary values |
A list of binning outcomes, including a numeric vector with cut points and a dataframe with binning summary
1 2 |
$cut
[1] 0 2 5
$tbl
bin freq miss bads rate woe iv ks rule
1 0 708 708 87 0.1229 -0.5760 0.0328 5.70 is.na($X$)
2 1 4527 0 754 0.1666 -0.2208 0.0346 21.37 $X$ <= 0
3 2 595 0 251 0.4218 1.0743 0.1493 7.47 $X$ > 0 & $X$ <= 2
4 3 96 0 68 0.7083 2.2767 0.1168 2.33 $X$ > 2 & $X$ <= 5
5 4 34 0 29 0.8529 3.1473 0.0735 0.00 $X$ > 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.