Description Usage Arguments Examples
create_infotables
returns WOE or NWOE tables (as data.frames), and a data.frame with IV or NIV values for all
predictive variables.
1 2 |
data |
input data.frame for analysis (this is typically your training dataset). |
valid |
validation data.frame (default is NULL). Must have the same variables as the training dataset. |
y |
dependent variable. |
bins |
number of bins (default is 10). |
trt |
binary treatment variable for uplift analysis (Default is NUL). |
ncore |
number of cores used. Default is to use available cores - 1. |
parallel |
set to TRUE for parallel processing. Number of cores is determined by the ncore parameter. |
1 2 3 4 5 6 7 8 9 10 11 |
##------------------------------------------------------------
## WOE analysis, no cross validation
##------------------------------------------------------------
library(Information)
data(train, package="Information")
train <- subset(train, TREATMENT==1)
IV <- Information::create_infotables(data=train, y="PURCHASE", parallel=FALSE)
print(head(IV$Summary), row.names=FALSE)
print(IV$Tables$N_OPEN_REV_ACTS, row.names=FALSE)
closeAllConnections()
|
[1] "Variable TREATMENT was removed because it has only 1 unique level"
Variable IV
N_OPEN_REV_ACTS 1.0107695
TOT_HI_CRDT_CRDT_LMT 0.9345902
RATIO_BAL_TO_HI_CRDT 0.8232539
D_NA_M_SNC_MST_RCNT_ACT_OPN 0.6355466
M_SNC_OLDST_RETAIL_ACT_OPN 0.5573438
M_SNC_MST_RCNT_ACT_OPN 0.5026402
N_OPEN_REV_ACTS N Percent WOE IV
[0,0] 1469 0.29545455 -2.0465968 0.6401443
[1,2] 958 0.19267900 -0.5900120 0.6958705
[3,3] 310 0.06234916 0.2033085 0.6986029
[4,5] 583 0.11725664 0.4419768 0.7244762
[6,8] 632 0.12711183 0.6148243 0.7810611
[9,11] 453 0.09111022 0.8815772 0.8692672
[12,48] 567 0.11403862 0.9883818 1.0107695
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.