apply_binnings: Apply binnings

Description Usage Arguments Examples

Description

Apply binnings

Usage

1
apply_binnings(binnings, data, woe = FALSE, suffix = "_cat")

Arguments

binnings

A named list of binning objects.

data

A data frame containing variables to bin. Names need need to coincide.

woe

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

suffix

A string to be added to the output to disambiguate the original variables names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("german_credit")

dbiv <- describe_bivariate(german_credit, target = good_bad)
dbiv <- dplyr::filter(dbiv, iv > 0.1)

binnings <- dplyr::select(dbiv, variable, binning)
binnings <- tibble::deframe(binnings)

data <- dplyr::select(german_credit, credit_amount, property,
                      purpose, credit_history, good_bad)

apply_binnings(binnings, data)

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