best_iv | R Documentation |
Calculate the Best IV Value for the Binned Data
best_iv(df, variable, bin, method, label_iv)
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. |
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.
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' )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.