best_iv {autoScorecard} | R Documentation |
Calculate the Best IV Value for the Binned Data
Description
Calculate the Best IV Value for the Binned Data
Usage
best_iv(df, variable, bin, method, label_iv)
Arguments
df |
A data.frame with independent variables and target variable. |
variable |
Name of variable. |
bin |
Name of bins. |
method |
Name of method. |
label_iv |
Name of IV. |
Value
A data frame of best IV, including the contents of the bin, the upper bound of the bin, the lower bound of the bin, and all the contents returned by the get_IV function.
Examples
accepts <- read.csv( system.file( "extdata" , "accepts.csv" , package = "autoScorecard" ))
feature <- stats::na.omit( accepts[,c(1,3,7:23)] )
f_1 <-bins_unsupervised( df = feature , id="application_id" , label="bad_ind" ,
methods = c("k_means", "equal_width","equal_freq" ) , bin_nums=10 )
best1 <- best_iv( df=f_1 ,bin=c('bins') , method = c('method') ,
variable= c( "variable" ) ,label_iv='miv' )
[Package autoScorecard version 0.3.0 Index]