Learn R Programming

mob (version 0.4.2)

cal_woe: Perform WoE transformation of a numeric variable

Description

The function cal_woe applies the WoE transformation to a numeric vector based on the binning outcome from a binning function, e.g. qtl_bin() or iso_bin().

Usage

cal_woe(x, bin)

Arguments

x

A numeric vector that will be transformed to WoE values.

bin

A list with the binning outcome from the binning function, e.g. qtl_bin() or iso_bin()

Value

A numeric vector with WoE transformed values.

Examples

Run this code
# NOT RUN {
data(hmeq)
bin_out <- qtl_bin(hmeq$DEROG, hmeq$BAD)
cal_woe(hmeq$DEROG[1:10], bin_out)
# }

Run the code above in your browser using DataLab