replace.woe: replace original levels with Weight of Evidence (WOE)

Description Usage Arguments Value Examples

View source: R/replace_woe.R

Description

replace.woe replace the original levels with the calculated WOE from the level.stat function. It will replace all variables that can be found from stat

Usage

1

Arguments

data

The data frame needs to be replaced

stat

The statistics generated from level.stat

replace

Whether to replace (replace = TRUE) the original values or add a new column to the end of the data (replace = FALSE).

Value

a data frame with WOE values.

Examples

1
2
3
data <- rpart::stagec
st <- level.stat(data, x = c('eet', 'ploidy'), y = 'pgstat')
replace.woe(data, stat = st)

JianhuaHuang/streamit documentation built on May 7, 2019, 10:40 a.m.