Learn R Programming

mob (version 0.4.2)

batch_woe: Apply WoE transformations to vectors in dataframe

Description

The function batch_woe applies WoE transformations to vectors in the dataframe.

Usage

batch_woe(xs, bin_out)

Arguments

xs

A dataframe with numeric vectors to discretize.

bin_out

A binning output from the function batch_bin().

Value

A dataframe with identical headers as the input xs. However, values of each variable have been transformed to WoE values.

Examples

Run this code
# NOT RUN {
data(hmeq)
bin_out <- batch_bin(hmeq$BAD, hmeq[, c('DEROG', 'DELINQ')])$bin_out
head(batch_woe(hmeq[, c('DEROG', 'DELINQ')], bin_out))
# }

Run the code above in your browser using DataLab