Description Usage Arguments Value Author(s) Examples
The function takes the num_woe_table output from a class "iv_table". Based on the split points from the num_woe_table, the numerical variables are binned into categories.
1 | num_to_cat(base, num_woe_table, num_missing = -99999)
|
base |
input dataframe |
num_woe_table |
num_woe_table class from iv table output |
num_missing |
(optional) imputed missing value for numerical variable (default value is -99999) |
The function returns a dataframe after converting the numerical variables into categorical classes.
Arya Poddar <aryapoddar290990@gmail.com>
1 2 3 4 5 | data <- iris
data$Y <- sample(0:1,size=nrow(data),replace=TRUE)
x <- c("Sepal.Length","Sepal.Width","Petal.Length","Petal.Width")
iv_table_list <- iv_table(base = data,target = "Y",num_var_name = x,cat_var_name = "Species")
num_cat <- num_to_cat(base = data,num_woe_table = iv_table_list$num_woe_table)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.