apply_binning: Apply binning

Description Usage Arguments Examples

Description

Apply binning

Usage

1
apply_binning(bin, x, woe = FALSE)

Arguments

bin

A binning object.

x

A variable to bin.

woe

If the value is the woe instead of the categoric variable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
x <- runif(500)
y <- rbinom(500, 1, x)
bin <- binning(x, y)
xnew <- runif(50)

apply_binning(bin, xnew)
apply_binning(bin, xnew, woe = TRUE)


data(german_credit)
x <- german_credit$purpose
y <- german_credit$good_bad
bin <- binning(x, y)
xnew <- sample(x, 50)

apply_binning(bin, xnew)
apply_binning(bin, xnew, woe = TRUE)

jbkunst/irks documentation built on May 22, 2021, 2:09 p.m.