| WOEProfet | R Documentation | 
Function that calculates the WOE for each bin and the information value for each variable.
WOEProfet(data, id, target, varcol)
| data | Dataframe of binned variables. | 
| id | ID variable. | 
| target | A binary target variable. | 
| varcol | Vector of variables to have WOE transformation. | 
A list with the following components.
| Bin | Dataframe with the binned variables and their WOE values. | 
| WOE | Dataframe with the WOE values. | 
| IV | Each attribute and their associated information values. | 
| vars | A list containing the different WOE values for each attribute. | 
mydata <- ISLR::Default
mydata$ID = seq(1:nrow(mydata)) ## make the ID variable
mydata$default<-ifelse(mydata$default=="Yes",1,0) ## Creating numeric binary target variable
binned <- BinProfet(mydata, id= "ID", target= "default", num.bins = 5) ## Binning variables
WOE_dat <- WOEProfet(binned, "ID", "default", 3:5)
head(WOE_dat$Bin)
head(WOE_dat$WOE)
WOE_dat$IV
head(WOE_dat$vars$income)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.