woe: WoE Calculation

Description Usage Arguments Examples

Description

WoE Calculation

Usage

1
woe(df, y, x, cutp = NULL, good = NULL, na.exclude = FALSE)

Arguments

df

data.frame

y

response variable

x

predictor

cutp

default NULL. If not provided, x will be treated as a factor. If x is a factor, this parameter will be ignored. Otherwise, x will be cut into a factor.

good

the name of good. If not provided, the first levels of y will be treated as good

na.exclude

whether NA values should be removed or kept as an independent level. FALSE by default.

Examples

1
2
df = data.frame(y = sample(c(0, 1), 100, replace = TRUE), x = runif(100))
woe(df, 'y', 'x', cutp = c(0, 0.3, 0.6, 1), good = '0')

siyuany/autobin documentation built on May 29, 2019, 11 p.m.