rep_woe {autoScorecard}R Documentation

Replace Feature Data by Binning Template

Description

Replace Feature Data by Binning Template

Usage

rep_woe(df, key_var, y_var, tool, var_label, col_woe, lower, upper)

Arguments

df

A data.frame with independent variables and target variable.

key_var

A name of index variable name.

y_var

A name of target variable.

tool

Binning template.

var_label

The name of the characteristic variable.

col_woe

The name of the woe variable

lower

The name of the binning lower bound.

upper

The name of the binning upper bound.

Value

A data frame of woe

Examples

accepts <- read.csv( system.file( "extdata", "accepts.csv", package ="autoScorecard" ))
feature <- stats::na.omit( accepts[,c(1,3,7:23)] )
all2 <- bins_tree( df = feature, key_var = "application_id", y_var = "bad_ind",
max_depth = 3, p= 0.1)
re2 <- rep_woe(  df= feature ,key_var = "application_id", y_var = "bad_ind",
tool = all2, var_label = "variable",col_woe ='woe', lower ='lower',upper ='upper')

[Package autoScorecard version 0.3.0 Index]