KDD2009 example. Winners had hold-out AUC of 0.7611 on churn. See here for more details.

#load some libraries
# http://www.win-vector.com/blog/2014/08/vtreat-designing-a-package-for-variable-treatment/
# Using dev version of vtreat
# devtools::install_github("WinVector/vtreat")  # to get 0.5.22 version with vtreat::mkCrossFrameCExperiment()
library('vtreat')
# devtools::install_github("WinVector/WVPlots")
library('WVPlots')

library('parallel')
library('gbm')
## Loading required package: survival
## Loading required package: lattice
## Loading required package: splines
## Loaded gbm 2.1.3
#library('class')
library('ggplot2')
library('randomForest')
## randomForest 4.6-12
## Type rfNews() to see new features/changes/bug fixes.
## 
## Attaching package: 'randomForest'
## The following object is masked from 'package:ggplot2':
## 
##     margin
# load the data as in the book
# change this path to match your directory structure
dir = '~/Documents/work/zmPDSwR/KDD2009/' 

d = read.table(paste(dir,'orange_small_train.data.gz',sep=''),
                header=T,sep='\t',na.strings=c('NA',''), 
               stringsAsFactors=FALSE)
churn = read.table(paste(dir,'orange_small_train_churn.labels.txt',sep=''),
                    header=F,sep='\t')
d$churn = churn$V1
appetency = read.table(paste(dir,'orange_small_train_appetency.labels.txt',sep=''),
                        header=F,sep='\t')
d$appetency = appetency$V1
upselling = read.table(paste(dir,'orange_small_train_upselling.labels.txt',sep=''),
                        header=F,sep='\t')
d$upselling = upselling$V1
set.seed(729375)
d$rgroup = runif(dim(d)[[1]])
dTrain = subset(d,rgroup<=0.9)  # shared set for impact models and training
dTest = subset(d,rgroup>0.9) # set for evaluation
debug = FALSE
if(debug) {
  dTrain <- dTrain[sample.int(nrow(dTrain),100),]
  dTest <- dTest[sample.int(nrow(dTest),100),]
}
rm(list=c('d','churn','appetency','upselling','dir'))
outcomes = c('churn','appetency','upselling')
nonvars <- c(outcomes,'rgroup')
vars = setdiff(colnames(dTrain),
                nonvars)
yName = 'churn'
yTarget = 1

This is a fun little experiment. We use all of the training data both for variable design and then for modeling. This sets up the potential of a bad nested model bias. We work around this by using a “cross frame” which is a special data frame that has been treated, but not by the returned treatment plan. Each row is the cross frame was built by a treatment plan built from a disjoint set of rows (a lot like cross validation). This (hopefully) makes the rows in the cross frame exchangable with future rows, as neither is directly involved in the treatment design. The hope is this improves generalization error while allowing us to use all of our available data for training.

# build data treatments

set.seed(239525)

cl <- c()
if(!debug) {
  ncore <- parallel::detectCores()
  cl <- parallel::makeCluster(ncore)
}
base::date()
## [1] "Thu Aug 10 21:53:43 2017"
# @param v character variable name
# @param vcol character, independent or input variable
# @param y logical, dependent or outcome variable to predict
# @param weights row/example weights
# @return scored training data column
ppCoderC <- function(v, vcol, 
                     y, 
                     weights) {
  # classification case y ~ vcol
  d <- data.frame(x = vcol,
                  y = y,
                  stringsAsFactors = FALSE)
  m = lme4::glmer(y ~ (1 | x), data=d, weights=weights, family=binomial)
  predict(m, newdata=d, type='link')
}

customCoders = list('c.poolC.center' = ppCoderC)
codeRestriction <- c('clean', 
                     'isBAD',
                     'lev',
                     'poolC')


# build treatments on just the coding data
crossExpmt = mkCrossFrameCExperiment(dTrain,
    vars,yName,yTarget,
    smFactor=2.0, 
    customCoders=customCoders,
    codeRestriction = codeRestriction,
    parallelCluster=cl)
treatmentsC <- crossExpmt$treatments
treatedTrain <- crossExpmt$crossFrame

kddSig = 1/(10*nrow(treatmentsC$scoreFrame))
print(treatmentsC$scoreFrame)
##                                    varName varMoves          rsq
## 1                               Var1_clean     TRUE 1.707738e-07
## 2                               Var1_isBAD     TRUE 2.376463e-05
## 3                               Var2_clean     TRUE 1.301517e-06
## 4                               Var2_isBAD     TRUE 8.842007e-04
## 5                               Var3_clean     TRUE 3.682200e-06
## 6                               Var3_isBAD     TRUE 8.812072e-04
## 7                               Var4_clean     TRUE 2.242221e-05
## 8                               Var4_isBAD     TRUE 9.593148e-04
## 9                               Var5_clean     TRUE 2.101209e-06
## 10                              Var5_isBAD     TRUE 9.813199e-04
## 11                              Var6_clean     TRUE 6.692933e-04
## 12                              Var6_isBAD     TRUE 2.669092e-03
## 13                              Var7_clean     TRUE 9.401229e-03
## 14                              Var7_isBAD     TRUE 2.013427e-03
## 15                              Var9_clean     TRUE 5.535608e-06
## 16                              Var9_isBAD     TRUE 2.376463e-05
## 17                             Var10_clean     TRUE 2.798671e-05
## 18                             Var10_isBAD     TRUE 9.813199e-04
## 19                             Var11_clean     TRUE 4.620527e-07
## 20                             Var11_isBAD     TRUE 8.812072e-04
## 21                             Var12_clean     TRUE 3.286502e-05
## 22                             Var12_isBAD     TRUE 2.824210e-06
## 23                             Var13_clean     TRUE 5.312771e-03
## 24                             Var13_isBAD     TRUE 2.013427e-03
## 25                             Var14_clean     TRUE 4.824661e-05
## 26                             Var14_isBAD     TRUE 8.812072e-04
## 27                             Var16_clean     TRUE 7.339335e-06
## 28                             Var16_isBAD     TRUE 9.813199e-04
## 29                             Var17_clean     TRUE 1.901332e-06
## 30                             Var17_isBAD     TRUE 9.593148e-04
## 31                             Var18_clean     TRUE 8.549687e-07
## 32                             Var18_isBAD     TRUE 9.593148e-04
## 33                             Var19_clean     TRUE 6.207361e-05
## 34                             Var19_isBAD     TRUE 9.593148e-04
## 35                             Var21_clean     TRUE 1.244994e-04
## 36                             Var21_isBAD     TRUE 2.669092e-03
## 37                             Var22_clean     TRUE 1.202719e-04
## 38                             Var22_isBAD     TRUE 2.752908e-03
## 39                             Var23_clean     TRUE 4.461252e-06
## 40                             Var23_isBAD     TRUE 9.813199e-04
## 41                             Var24_clean     TRUE 2.381645e-04
## 42                             Var24_isBAD     TRUE 1.922021e-04
## 43                             Var25_clean     TRUE 2.332698e-04
## 44                             Var25_isBAD     TRUE 2.752908e-03
## 45                             Var26_clean     TRUE 2.357416e-06
## 46                             Var26_isBAD     TRUE 9.813199e-04
## 47                             Var27_clean     TRUE 2.457780e-05
## 48                             Var27_isBAD     TRUE 9.813199e-04
## 49                             Var28_clean     TRUE 3.833977e-04
## 50                             Var28_isBAD     TRUE 2.758522e-03
## 51                             Var29_clean     TRUE 2.992132e-05
## 52                             Var29_isBAD     TRUE 2.376463e-05
## 53                             Var30_clean     TRUE 1.455348e-06
## 54                             Var30_isBAD     TRUE 2.376463e-05
## 55                             Var33_clean     TRUE 2.139896e-06
## 56                             Var33_isBAD     TRUE 6.334417e-04
## 57                             Var34_clean     TRUE 5.628613e-05
## 58                             Var34_isBAD     TRUE 8.842007e-04
## 59                             Var35_clean     TRUE 1.449378e-04
## 60                             Var35_isBAD     TRUE 2.752908e-03
## 61                             Var36_clean     TRUE 1.925105e-06
## 62                             Var36_isBAD     TRUE 8.842007e-04
## 63                             Var37_clean     TRUE 6.040173e-06
## 64                             Var37_isBAD     TRUE 9.593148e-04
## 65                             Var38_clean     TRUE 9.294635e-05
## 66                             Var38_isBAD     TRUE 2.752908e-03
## 67                             Var40_clean     TRUE 6.874257e-06
## 68                             Var40_isBAD     TRUE 8.842007e-04
## 69                             Var41_clean     TRUE 8.125736e-07
## 70                             Var41_isBAD     TRUE 2.376463e-05
## 71                             Var43_clean     TRUE 2.646768e-07
## 72                             Var43_isBAD     TRUE 8.842007e-04
## 73                             Var44_clean     TRUE 8.606183e-06
## 74                             Var44_isBAD     TRUE 2.752908e-03
## 75                             Var45_clean     TRUE 3.168094e-05
## 76                             Var45_isBAD     TRUE 6.815674e-05
## 77                             Var46_clean     TRUE 9.365760e-06
## 78                             Var46_isBAD     TRUE 8.842007e-04
## 79                             Var47_clean     TRUE 7.318111e-06
## 80                             Var47_isBAD     TRUE 2.376463e-05
## 81                             Var49_clean     TRUE 1.746703e-05
## 82                             Var49_isBAD     TRUE 8.842007e-04
## 83                             Var50_clean     TRUE 1.415621e-05
## 84                             Var50_isBAD     TRUE 2.376463e-05
## 85                             Var51_clean     TRUE 8.959166e-05
## 86                             Var51_isBAD     TRUE 6.809351e-04
## 87                             Var53_clean     TRUE 9.100583e-05
## 88                             Var53_isBAD     TRUE 2.376463e-05
## 89                             Var54_clean     TRUE 1.890838e-06
## 90                             Var54_isBAD     TRUE 8.842007e-04
## 91                             Var56_clean     TRUE 2.661011e-06
## 92                             Var56_isBAD     TRUE 1.729184e-04
## 93                             Var57_clean     TRUE 1.022196e-04
## 94                             Var58_clean     TRUE 1.654949e-07
## 95                             Var58_isBAD     TRUE 2.376463e-05
## 96                             Var59_clean     TRUE 2.072696e-05
## 97                             Var59_isBAD     TRUE 2.278508e-04
## 98                             Var60_clean     TRUE 1.519718e-06
## 99                             Var60_isBAD     TRUE 9.813199e-04
## 100                            Var61_clean     TRUE 2.420575e-07
## 101                            Var61_isBAD     TRUE 6.334417e-04
## 102                            Var62_clean     TRUE 1.707981e-05
## 103                            Var62_isBAD     TRUE 2.824210e-06
## 104                            Var63_clean     TRUE 3.622738e-06
## 105                            Var63_isBAD     TRUE 1.905424e-05
## 106                            Var64_clean     TRUE 2.368972e-07
## 107                            Var64_isBAD     TRUE 7.138463e-05
## 108                            Var65_clean     TRUE 2.974265e-03
## 109                            Var65_isBAD     TRUE 2.013427e-03
## 110                            Var66_clean     TRUE 5.293235e-06
## 111                            Var66_isBAD     TRUE 1.905424e-05
## 112                            Var67_clean     TRUE 6.980197e-06
## 113                            Var67_isBAD     TRUE 9.813199e-04
## 114                            Var68_clean     TRUE 4.467666e-06
## 115                            Var68_isBAD     TRUE 8.842007e-04
## 116                            Var69_clean     TRUE 4.287441e-05
## 117                            Var69_isBAD     TRUE 9.813199e-04
## 118                            Var70_clean     TRUE 4.949917e-06
## 119                            Var70_isBAD     TRUE 9.813199e-04
## 120                            Var71_clean     TRUE 2.338406e-07
## 121                            Var71_isBAD     TRUE 8.364368e-04
## 122                            Var72_clean     TRUE 2.007878e-03
## 123                            Var72_isBAD     TRUE 1.088311e-04
## 124                            Var73_clean     TRUE 9.348087e-03
## 125                            Var74_clean     TRUE 6.365026e-03
## 126                            Var74_isBAD     TRUE 2.013427e-03
## 127                            Var75_clean     TRUE 1.315107e-05
## 128                            Var75_isBAD     TRUE 8.842007e-04
## 129                            Var76_clean     TRUE 9.888848e-05
## 130                            Var76_isBAD     TRUE 2.752908e-03
## 131                            Var77_clean     TRUE 3.158199e-05
## 132                            Var77_isBAD     TRUE 2.376463e-05
## 133                            Var78_clean     TRUE 1.478578e-05
## 134                            Var78_isBAD     TRUE 2.752908e-03
## 135                            Var80_clean     TRUE 1.189857e-06
## 136                            Var80_isBAD     TRUE 9.813199e-04
## 137                            Var81_clean     TRUE 2.090128e-03
## 138                            Var81_isBAD     TRUE 2.669092e-03
## 139                            Var82_clean     TRUE 1.485500e-04
## 140                            Var82_isBAD     TRUE 9.593148e-04
## 141                            Var83_clean     TRUE 1.189160e-06
## 142                            Var83_isBAD     TRUE 2.752908e-03
## 143                            Var84_clean     TRUE 6.291164e-06
## 144                            Var84_isBAD     TRUE 8.812072e-04
## 145                            Var85_clean     TRUE 2.446822e-04
## 146                            Var85_isBAD     TRUE 2.752908e-03
## 147                            Var86_clean     TRUE 9.617082e-06
## 148                            Var86_isBAD     TRUE 2.376463e-05
## 149                            Var87_clean     TRUE 1.218989e-05
## 150                            Var87_isBAD     TRUE 2.376463e-05
## 151                            Var88_clean     TRUE 2.516853e-06
## 152                            Var88_isBAD     TRUE 5.822901e-04
## 153                            Var89_clean     TRUE 1.216605e-05
## 154                            Var89_isBAD     TRUE 1.729184e-04
## 155                            Var90_clean     TRUE 8.583476e-06
## 156                            Var90_isBAD     TRUE 2.376463e-05
## 157                            Var91_clean     TRUE 2.338406e-07
## 158                            Var91_isBAD     TRUE 8.364368e-04
## 159                            Var92_clean     TRUE 1.829928e-05
## 160                            Var92_isBAD     TRUE 5.017689e-07
## 161                            Var93_clean     TRUE 9.630558e-07
## 162                            Var93_isBAD     TRUE 9.813199e-04
## 163                            Var94_clean     TRUE 3.706455e-04
## 164                            Var94_isBAD     TRUE 1.088311e-04
## 165                            Var95_clean     TRUE 1.059663e-06
## 166                            Var95_isBAD     TRUE 8.842007e-04
## 167                            Var96_clean     TRUE 2.887014e-08
## 168                            Var96_isBAD     TRUE 8.842007e-04
## 169                            Var97_clean     TRUE 1.828139e-05
## 170                            Var97_isBAD     TRUE 9.813199e-04
## 171                            Var98_clean     TRUE 1.749498e-05
## 172                            Var98_isBAD     TRUE 2.824210e-06
## 173                            Var99_clean     TRUE 2.506301e-06
## 174                            Var99_isBAD     TRUE 9.593148e-04
## 175                           Var100_clean     TRUE 3.502919e-05
## 176                           Var100_isBAD     TRUE 2.376463e-05
## 177                           Var101_clean     TRUE 5.007522e-07
## 178                           Var101_isBAD     TRUE 6.009046e-04
## 179                           Var102_clean     TRUE 6.719232e-07
## 180                           Var102_isBAD     TRUE 1.742866e-04
## 181                           Var103_clean     TRUE 1.832483e-08
## 182                           Var103_isBAD     TRUE 9.813199e-04
## 183                           Var104_clean     TRUE 6.544461e-07
## 184                           Var104_isBAD     TRUE 2.278508e-04
## 185                           Var105_clean     TRUE 6.544461e-07
## 186                           Var105_isBAD     TRUE 2.278508e-04
## 187                           Var106_clean     TRUE 1.865813e-08
## 188                           Var106_isBAD     TRUE 9.593148e-04
## 189                           Var107_clean     TRUE 5.982784e-07
## 190                           Var107_isBAD     TRUE 9.813199e-04
## 191                           Var108_clean     TRUE 2.411380e-05
## 192                           Var108_isBAD     TRUE 2.376463e-05
## 193                           Var109_clean     TRUE 7.512612e-05
## 194                           Var109_isBAD     TRUE 1.922021e-04
## 195                           Var110_clean     TRUE 1.029613e-04
## 196                           Var110_isBAD     TRUE 2.376463e-05
## 197                           Var111_clean     TRUE 1.831059e-05
## 198                           Var111_isBAD     TRUE 8.364368e-04
## 199                           Var112_clean     TRUE 8.914228e-05
## 200                           Var112_isBAD     TRUE 2.752908e-03
## 201                           Var113_clean     TRUE 6.466721e-03
## 202                           Var114_clean     TRUE 7.579150e-05
## 203                           Var114_isBAD     TRUE 8.842007e-04
## 204                           Var115_clean     TRUE 1.875382e-05
## 205                           Var115_isBAD     TRUE 2.278508e-04
## 206                           Var116_clean     TRUE 9.347354e-07
## 207                           Var116_isBAD     TRUE 2.376463e-05
## 208                           Var117_clean     TRUE 1.841859e-05
## 209                           Var117_isBAD     TRUE 9.593148e-04
## 210                           Var118_isBAD     TRUE 5.017689e-07
## 211                           Var119_clean     TRUE 2.049167e-04
## 212                           Var119_isBAD     TRUE 2.669092e-03
## 213                           Var120_clean     TRUE 1.314419e-07
## 214                           Var120_isBAD     TRUE 9.813199e-04
## 215                           Var121_clean     TRUE 1.874938e-07
## 216                           Var121_isBAD     TRUE 2.376463e-05
## 217                           Var122_clean     TRUE 1.639903e-05
## 218                           Var122_isBAD     TRUE 8.842007e-04
## 219                           Var123_clean     TRUE 1.484573e-06
## 220                           Var123_isBAD     TRUE 2.752908e-03
## 221                           Var124_clean     TRUE 1.663284e-06
## 222                           Var124_isBAD     TRUE 9.593148e-04
## 223                           Var125_clean     TRUE 9.922533e-04
## 224                           Var125_isBAD     TRUE 2.013427e-03
## 225                           Var126_clean     TRUE 3.292754e-03
## 226                           Var126_isBAD     TRUE 1.382784e-02
## 227                           Var127_clean     TRUE 1.489649e-07
## 228                           Var127_isBAD     TRUE 5.822901e-04
## 229                           Var128_clean     TRUE 2.516853e-06
## 230                           Var128_isBAD     TRUE 5.822901e-04
## 231                           Var129_clean     TRUE 1.668883e-06
## 232                           Var129_isBAD     TRUE 2.376463e-05
## 233                           Var130_clean     TRUE 1.472623e-04
## 234                           Var130_isBAD     TRUE 8.812072e-04
## 235                           Var131_clean     TRUE 8.857586e-05
## 236                           Var131_isBAD     TRUE 2.376463e-05
## 237                           Var132_clean     TRUE 1.050156e-04
## 238                           Var132_isBAD     TRUE 2.752908e-03
## 239                           Var133_clean     TRUE 4.195594e-07
## 240                           Var133_isBAD     TRUE 2.752908e-03
## 241                           Var134_clean     TRUE 4.784319e-05
## 242                           Var134_isBAD     TRUE 2.752908e-03
## 243                           Var135_clean     TRUE 2.540145e-07
## 244                           Var135_isBAD     TRUE 9.593148e-04
## 245                           Var136_clean     TRUE 6.724954e-05
## 246                           Var136_isBAD     TRUE 1.905424e-05
## 247                           Var137_clean     TRUE 8.961677e-06
## 248                           Var137_isBAD     TRUE 2.376463e-05
## 249                           Var138_clean     TRUE 1.468793e-06
## 250                           Var138_isBAD     TRUE 9.593148e-04
## 251                           Var139_clean     TRUE 1.877498e-04
## 252                           Var139_isBAD     TRUE 9.813199e-04
## 253                           Var140_clean     TRUE 2.972593e-03
## 254                           Var140_isBAD     TRUE 2.013427e-03
## 255                           Var142_clean     TRUE 8.540294e-05
## 256                           Var142_isBAD     TRUE 2.376463e-05
## 257                           Var143_clean     TRUE 2.069294e-04
## 258                           Var143_isBAD     TRUE 2.752908e-03
## 259                           Var144_clean     TRUE 5.421069e-03
## 260                           Var144_isBAD     TRUE 2.669092e-03
## 261                           Var145_clean     TRUE 2.214467e-06
## 262                           Var145_isBAD     TRUE 9.593148e-04
## 263                           Var146_clean     TRUE 1.374061e-06
## 264                           Var146_isBAD     TRUE 9.813199e-04
## 265                           Var147_clean     TRUE 4.650091e-05
## 266                           Var147_isBAD     TRUE 9.813199e-04
## 267                           Var148_clean     TRUE 2.375842e-07
## 268                           Var148_isBAD     TRUE 9.813199e-04
## 269                           Var149_clean     TRUE 3.035956e-04
## 270                           Var149_isBAD     TRUE 1.922021e-04
## 271                           Var150_clean     TRUE 6.366222e-07
## 272                           Var150_isBAD     TRUE 9.593148e-04
## 273                           Var151_clean     TRUE 2.547260e-07
## 274                           Var151_isBAD     TRUE 6.334417e-04
## 275                           Var152_clean     TRUE 1.076772e-06
## 276                           Var152_isBAD     TRUE 9.593148e-04
## 277                           Var153_clean     TRUE 1.212715e-04
## 278                           Var153_isBAD     TRUE 2.752908e-03
## 279                           Var154_clean     TRUE 1.377245e-05
## 280                           Var154_isBAD     TRUE 2.376463e-05
## 281                           Var155_clean     TRUE 7.579784e-09
## 282                           Var155_isBAD     TRUE 9.593148e-04
## 283                           Var156_clean     TRUE 5.293235e-06
## 284                           Var156_isBAD     TRUE 1.905424e-05
## 285                           Var157_clean     TRUE 2.116221e-06
## 286                           Var157_isBAD     TRUE 8.364368e-04
## 287                           Var158_clean     TRUE 2.308670e-07
## 288                           Var158_isBAD     TRUE 6.009046e-04
## 289                           Var159_clean     TRUE 2.056477e-08
## 290                           Var159_isBAD     TRUE 8.842007e-04
## 291                           Var160_clean     TRUE 3.189096e-04
## 292                           Var160_isBAD     TRUE 2.752908e-03
## 293                           Var161_clean     TRUE 4.241662e-05
## 294                           Var161_isBAD     TRUE 9.593148e-04
## 295                           Var162_clean     TRUE 1.313263e-05
## 296                           Var162_isBAD     TRUE 8.842007e-04
## 297                           Var163_clean     TRUE 2.036059e-05
## 298                           Var163_isBAD     TRUE 2.752908e-03
## 299                           Var164_clean     TRUE 5.777051e-06
## 300                           Var164_isBAD     TRUE 9.593148e-04
## 301                           Var165_clean     TRUE 1.076948e-06
## 302                           Var165_isBAD     TRUE 6.009046e-04
## 303                           Var166_clean     TRUE 6.361302e-08
## 304                           Var166_isBAD     TRUE 9.813199e-04
## 305                           Var168_clean     TRUE 2.632379e-04
## 306                           Var168_isBAD     TRUE 2.376463e-05
## 307                           Var170_clean     TRUE 1.824976e-05
## 308                           Var170_isBAD     TRUE 8.842007e-04
## 309                           Var171_clean     TRUE 1.936309e-06
## 310                           Var171_isBAD     TRUE 5.822901e-04
## 311                           Var172_clean     TRUE 2.333664e-05
## 312                           Var172_isBAD     TRUE 9.813199e-04
## 313                           Var173_clean     TRUE 2.146180e-04
## 314                           Var173_isBAD     TRUE 2.752908e-03
## 315                           Var174_clean     TRUE 8.786963e-06
## 316                           Var174_isBAD     TRUE 9.593148e-04
## 317                           Var176_clean     TRUE 1.906705e-05
## 318                           Var176_isBAD     TRUE 8.812072e-04
## 319                           Var177_clean     TRUE 9.743841e-05
## 320                           Var177_isBAD     TRUE 8.842007e-04
## 321                           Var178_clean     TRUE 1.504063e-05
## 322                           Var178_isBAD     TRUE 1.729184e-04
## 323                           Var179_clean     TRUE 7.050251e-07
## 324                           Var179_isBAD     TRUE 9.593148e-04
## 325                           Var180_clean     TRUE 1.597244e-06
## 326                           Var180_isBAD     TRUE 2.376463e-05
## 327                           Var181_clean     TRUE 2.511719e-06
## 328                           Var181_isBAD     TRUE 2.752908e-03
## 329                           Var182_clean     TRUE 1.270683e-07
## 330                           Var182_isBAD     TRUE 9.593148e-04
## 331                           Var183_clean     TRUE 3.175159e-06
## 332                           Var183_isBAD     TRUE 8.842007e-04
## 333                           Var184_clean     TRUE 5.605842e-06
## 334                           Var184_isBAD     TRUE 8.842007e-04
## 335                           Var186_clean     TRUE 1.488303e-06
## 336                           Var186_isBAD     TRUE 2.376463e-05
## 337                           Var187_clean     TRUE 1.061685e-05
## 338                           Var187_isBAD     TRUE 2.376463e-05
## 339                           Var188_clean     TRUE 1.559784e-04
## 340                           Var188_isBAD     TRUE 8.842007e-04
## 341                           Var189_clean     TRUE 1.215778e-02
## 342                           Var189_isBAD     TRUE 7.021602e-05
## 343                           Var190_clean     TRUE 1.542036e-05
## 344                           Var190_isBAD     TRUE 7.148827e-05
## 345                           Var191_poolC     TRUE 1.427198e-04
## 346                          Var191_lev_NA     TRUE 5.822901e-04
## 347                      Var191_lev_x.r__I     TRUE 5.822901e-04
## 348                           Var192_poolC     TRUE 4.831206e-03
## 349                           Var193_poolC     TRUE 6.945906e-03
## 350                   Var193_lev_x.2Knk1KF     TRUE 3.946238e-03
## 351                   Var193_lev_x.AERks4l     TRUE 5.154941e-04
## 352                      Var193_lev_x.RO12     TRUE 7.482441e-03
## 353                           Var194_poolC     TRUE 5.776641e-04
## 354                          Var194_lev_NA     TRUE 6.774175e-04
## 355                      Var194_lev_x.SEuy     TRUE 6.516003e-04
## 356                           Var195_poolC     TRUE 9.620106e-04
## 357                      Var195_lev_x.taul     TRUE 8.659292e-04
## 358                      Var196_lev_x.1K8T     TRUE 1.184260e-04
## 359                           Var197_poolC     TRUE 1.190780e-03
## 360                      Var197_lev_x.0Xwj     TRUE 2.614387e-04
## 361                      Var197_lev_x.487l     TRUE 1.474812e-04
## 362                      Var197_lev_x.JLbT     TRUE 4.777289e-05
## 363                      Var197_lev_x.lK27     TRUE 8.639072e-06
## 364                      Var197_lev_x.ssAy     TRUE 3.496268e-04
## 365                      Var197_lev_x.TyGl     TRUE 1.649412e-04
## 366                           Var198_poolC     TRUE 5.857262e-03
## 367                   Var198_lev_x.fhk21Ss     TRUE 3.639729e-03
## 368                   Var198_lev_x.PHNvXy8     TRUE 2.676779e-04
## 369                           Var199_poolC     TRUE 9.819954e-03
## 370                           Var200_poolC     TRUE 3.710960e-03
## 371                          Var200_lev_NA     TRUE 5.221675e-03
## 372                           Var201_poolC     TRUE 5.917747e-04
## 373                          Var201_lev_NA     TRUE 6.764031e-04
## 374                      Var201_lev_x.smXZ     TRUE 6.856787e-04
## 375                           Var202_poolC     TRUE 1.781743e-03
## 376                           Var203_poolC     TRUE 6.190862e-06
## 377                      Var203_lev_x.9_Y1     TRUE 2.132636e-04
## 378                      Var203_lev_x.F3hy     TRUE 1.593405e-04
## 379                      Var203_lev_x.HLqf     TRUE 1.134369e-04
## 380                           Var204_poolC     TRUE 2.415563e-03
## 381                      Var204_lev_x.15m3     TRUE 7.239873e-05
## 382                      Var204_lev_x.7WNq     TRUE 1.534143e-05
## 383                      Var204_lev_x.k13i     TRUE 8.395798e-06
## 384                      Var204_lev_x.m_h1     TRUE 5.227433e-05
## 385                      Var204_lev_x.MBhA     TRUE 1.787647e-08
## 386                      Var204_lev_x.RcM7     TRUE 3.884860e-04
## 387                      Var204_lev_x.rGJy     TRUE 4.170045e-05
## 388                      Var204_lev_x.RVjC     TRUE 3.101599e-04
## 389                      Var204_lev_x.SkZj     TRUE 1.065582e-04
## 390                      Var204_lev_x.z5Ry     TRUE 3.680520e-04
## 391                           Var205_poolC     TRUE 7.449616e-03
## 392                          Var205_lev_NA     TRUE 3.654273e-05
## 393                      Var205_lev_x.09_Q     TRUE 3.953090e-04
## 394                   Var205_lev_x.sJzTlal     TRUE 7.992756e-03
## 395                      Var205_lev_x.VpdQ     TRUE 1.838477e-03
## 396                           Var206_poolC     TRUE 1.302213e-02
## 397                          Var206_lev_NA     TRUE 2.669092e-03
## 398                   Var206_lev_x.43pnToF     TRUE 7.057256e-05
## 399                      Var206_lev_x.6JmL     TRUE 2.641071e-04
## 400                      Var206_lev_x.hAFG     TRUE 1.246729e-03
## 401                      Var206_lev_x.haYg     TRUE 1.966152e-03
## 402                      Var206_lev_x.IYzP     TRUE 4.155829e-03
## 403                      Var206_lev_x.kxE9     TRUE 8.386641e-04
## 404                      Var206_lev_x.sYC_     TRUE 7.166591e-05
## 405                      Var206_lev_x.wMei     TRUE 6.364722e-05
## 406                      Var206_lev_x.y6dw     TRUE 2.358193e-03
## 407                      Var206_lev_x.zm5i     TRUE 2.389166e-03
## 408                           Var207_poolC     TRUE 6.152843e-03
## 409       Var207_lev_x.7M47J5GA0pTYIFxg5uy     TRUE 4.306844e-03
## 410 Var207_lev_x.DHn_WUyBhW_whjA88g9bvA64_     TRUE 1.298682e-03
## 411    Var207_lev_x.GjJ35utlTa_GNSvxxpb9ju     TRUE 1.630014e-09
## 412                      Var207_lev_x.Kxdu     TRUE 2.094525e-05
## 413                Var207_lev_x.me75fM6ugJ     TRUE 4.998167e-03
## 414                Var207_lev_x.NKv3VA1BpP     TRUE 2.076614e-04
## 415                           Var208_poolC     TRUE 1.113488e-04
## 416                      Var208_lev_x.kIsH     TRUE 8.969745e-05
## 417                      Var208_lev_x.sBgB     TRUE 1.246949e-04
## 418                           Var210_poolC     TRUE 3.979150e-03
## 419                      Var210_lev_x.g5HH     TRUE 2.823012e-03
## 420                      Var210_lev_x.uKAI     TRUE 2.933244e-03
## 421                           Var211_poolC     TRUE 1.920007e-03
## 422                      Var211_lev_x.L84s     TRUE 1.983812e-03
## 423                      Var211_lev_x.Mtgm     TRUE 1.983812e-03
## 424                           Var212_poolC     TRUE 1.111941e-02
## 425             Var212_lev_x.4kVnq_T26xq1p     TRUE 1.008038e-03
## 426                      Var212_lev_x.CrNX     TRUE 1.209590e-03
## 427                Var212_lev_x.FMSzZ91zL2     TRUE 3.273850e-06
## 428                   Var212_lev_x.Ie_5MZs     TRUE 2.730702e-04
## 429                   Var212_lev_x.NhsEn4L     TRUE 1.022997e-02
## 430             Var212_lev_x.XfqtO3UdzaXh_     TRUE 3.096231e-03
## 431                           Var213_poolC     TRUE 5.801939e-04
## 432                          Var213_lev_NA     TRUE 8.364368e-04
## 433                      Var213_lev_x.KdSa     TRUE 8.364368e-04
## 434                           Var214_poolC     TRUE 3.710961e-03
## 435                          Var214_lev_NA     TRUE 5.221675e-03
## 436                          Var215_lev_NA     TRUE 1.905424e-05
## 437                           Var216_poolC     TRUE 1.649013e-02
## 438                   Var216_lev_x.11p4mKe     TRUE 1.981395e-04
## 439                   Var216_lev_x.beK4AFX     TRUE 1.485499e-05
## 440                   Var216_lev_x.kZJtVhC     TRUE 2.894585e-04
## 441                   Var216_lev_x.kZJyVg2     TRUE 4.245052e-04
## 442                   Var216_lev_x.mAja5EA     TRUE 2.694294e-04
## 443                   Var216_lev_x.mAjbk_S     TRUE 3.650129e-05
## 444                   Var216_lev_x.NGZxnJM     TRUE 1.810763e-04
## 445                   Var216_lev_x.XTbPUYD     TRUE 2.576780e-03
## 446                           Var217_poolC     TRUE 1.037626e-02
## 447                           Var218_poolC     TRUE 1.225543e-02
## 448                      Var218_lev_x.cJvF     TRUE 5.213232e-03
## 449                      Var218_lev_x.UYBR     TRUE 1.952746e-03
## 450                           Var219_poolC     TRUE 2.873496e-04
## 451                          Var219_lev_NA     TRUE 3.754989e-05
## 452                   Var219_lev_x.AU8pNoi     TRUE 3.514857e-04
## 453                      Var219_lev_x.FzaX     TRUE 2.366853e-04
## 454                      Var219_lev_x.qxDb     TRUE 6.241460e-06
## 455                           Var220_poolC     TRUE 5.857263e-03
## 456                   Var220_lev_x.4UxGlow     TRUE 3.639729e-03
## 457                   Var220_lev_x.UF16siJ     TRUE 2.676779e-04
## 458                           Var221_poolC     TRUE 4.021424e-03
## 459                   Var221_lev_x.Al6ZaUT     TRUE 3.110711e-08
## 460                   Var221_lev_x.d0EEeJi     TRUE 1.316571e-03
## 461                      Var221_lev_x.oslk     TRUE 3.663874e-03
## 462                   Var221_lev_x.QKW8DRm     TRUE 9.667398e-04
## 463                      Var221_lev_x.zCkv     TRUE 1.371786e-03
## 464                           Var222_poolC     TRUE 5.857263e-03
## 465                   Var222_lev_x.APgdzOv     TRUE 2.676779e-04
## 466                   Var222_lev_x.catzS2D     TRUE 3.639729e-03
## 467                           Var223_poolC     TRUE 1.405996e-04
## 468                          Var223_lev_NA     TRUE 3.754989e-05
## 469                Var223_lev_x.jySVZNlOJy     TRUE 1.973840e-05
## 470                Var223_lev_x.LM8l689qOp     TRUE 2.142514e-07
## 471                      Var223_lev_x.M_8D     TRUE 4.124102e-07
## 472                           Var224_poolC     TRUE 9.739461e-05
## 473                          Var224_lev_NA     TRUE 2.278508e-04
## 474                           Var225_poolC     TRUE 5.773237e-03
## 475                          Var225_lev_NA     TRUE 5.347703e-03
## 476                      Var225_lev_x.ELof     TRUE 3.943064e-03
## 477                      Var225_lev_x.kG3k     TRUE 3.386476e-04
## 478                      Var225_lev_x.xG3x     TRUE 3.472140e-04
## 479                           Var226_poolC     TRUE 2.764439e-03
## 480                      Var226_lev_x.3Cy4     TRUE 1.358723e-05
## 481                      Var226_lev_x.453m     TRUE 9.648174e-07
## 482                      Var226_lev_x.5Acm     TRUE 2.350103e-05
## 483                      Var226_lev_x.7aLG     TRUE 4.801707e-05
## 484                      Var226_lev_x.7P5s     TRUE 1.072626e-03
## 485                      Var226_lev_x.Aoh3     TRUE 7.493082e-05
## 486                      Var226_lev_x.fKCe     TRUE 2.806790e-06
## 487                      Var226_lev_x.FSa2     TRUE 1.711157e-03
## 488                      Var226_lev_x.kwS7     TRUE 8.333578e-05
## 489                      Var226_lev_x.me1d     TRUE 3.537889e-04
## 490                      Var226_lev_x.PM2D     TRUE 1.386324e-04
## 491                      Var226_lev_x.Qcbd     TRUE 9.610901e-05
## 492                      Var226_lev_x.Qu4f     TRUE 1.855054e-04
## 493                      Var226_lev_x.rgKb     TRUE 3.848133e-05
## 494                      Var226_lev_x.szEZ     TRUE 5.733380e-04
## 495                      Var226_lev_x.TNEC     TRUE 3.767930e-05
## 496                      Var226_lev_x.uWr3     TRUE 2.287003e-04
## 497                      Var226_lev_x.WqMG     TRUE 1.177054e-05
## 498                      Var226_lev_x.Xa3G     TRUE 2.553343e-04
## 499                      Var226_lev_x.xb3V     TRUE 4.511720e-06
## 500                           Var227_poolC     TRUE 5.796744e-03
## 501                   Var227_lev_x.02N6s8f     TRUE 3.885425e-04
## 502                      Var227_lev_x.6fzt     TRUE 4.630302e-05
## 503                   Var227_lev_x.nIGXDli     TRUE 5.178077e-04
## 504                      Var227_lev_x.RAYp     TRUE 4.935790e-03
## 505                      Var227_lev_x.ZI9m     TRUE 4.397419e-03
## 506                           Var228_poolC     TRUE 8.672482e-03
## 507                   Var228_lev_x.55YFVY9     TRUE 1.582448e-03
## 508             Var228_lev_x.F2FyR07IdsN7I     TRUE 7.853328e-03
## 509             Var228_lev_x.ib5G6X1eUxUn6     TRUE 2.156409e-03
## 510                Var228_lev_x.iyHGyLCEkQ     TRUE 1.486904e-03
## 511          Var228_lev_x.R4y5gQQWY8OodqDV     TRUE 6.857407e-04
## 512       Var228_lev_x.TCU50_Yjmm6GIBZ0lL_     TRUE 1.257458e-03
## 513             Var228_lev_x.xwM2aC7IdeMC0     TRUE 1.032290e-05
## 514                           Var229_poolC     TRUE 6.681509e-03
## 515                          Var229_lev_NA     TRUE 7.040483e-03
## 516                      Var229_lev_x.am7c     TRUE 2.787288e-03
## 517                      Var229_lev_x.mj86     TRUE 2.462524e-03
##              sig needsSplit extraModelDegrees origName  code
## 1   9.492776e-01      FALSE                 0     Var1 clean
## 2   4.529984e-01      FALSE                 0     Var1 isBAD
## 3   8.605947e-01      FALSE                 0     Var2 clean
## 4   4.708216e-06      FALSE                 0     Var2 isBAD
## 5   7.676960e-01      FALSE                 0     Var3 clean
## 6   4.885833e-06      FALSE                 0     Var3 isBAD
## 7   4.660491e-01      FALSE                 0     Var4 clean
## 8   1.862012e-06      FALSE                 0     Var4 isBAD
## 9   8.234268e-01      FALSE                 0     Var5 clean
## 10  1.419659e-06      FALSE                 0     Var5 isBAD
## 11  6.820836e-05      FALSE                 0     Var6 clean
## 12  1.822398e-15      FALSE                 0     Var6 isBAD
## 13  2.243008e-50      FALSE                 0     Var7 clean
## 14  4.938685e-12      FALSE                 0     Var7 isBAD
## 15  7.172173e-01      FALSE                 0     Var9 clean
## 16  4.529984e-01      FALSE                 0     Var9 isBAD
## 17  4.154370e-01      FALSE                 0    Var10 clean
## 18  1.419659e-06      FALSE                 0    Var10 isBAD
## 19  9.166634e-01      FALSE                 0    Var11 clean
## 20  4.885833e-06      FALSE                 0    Var11 isBAD
## 21  3.775127e-01      FALSE                 0    Var12 clean
## 22  7.958694e-01      FALSE                 0    Var12 isBAD
## 23  3.243381e-29      FALSE                 0    Var13 clean
## 24  4.938685e-12      FALSE                 0    Var13 isBAD
## 25  2.849611e-01      FALSE                 0    Var14 clean
## 26  4.885833e-06      FALSE                 0    Var14 isBAD
## 27  6.766542e-01      FALSE                 0    Var16 clean
## 28  1.419659e-06      FALSE                 0    Var16 isBAD
## 29  8.319031e-01      FALSE                 0    Var17 clean
## 30  1.862012e-06      FALSE                 0    Var17 isBAD
## 31  8.868140e-01      FALSE                 0    Var18 clean
## 32  1.862012e-06      FALSE                 0    Var18 isBAD
## 33  2.251994e-01      FALSE                 0    Var19 clean
## 34  1.862012e-06      FALSE                 0    Var19 isBAD
## 35  8.586691e-02      FALSE                 0    Var21 clean
## 36  1.822398e-15      FALSE                 0    Var21 isBAD
## 37  9.137265e-02      FALSE                 0    Var22 clean
## 38  6.650215e-16      FALSE                 0    Var22 isBAD
## 39  7.450751e-01      FALSE                 0    Var23 clean
## 40  1.419659e-06      FALSE                 0    Var23 isBAD
## 41  1.751853e-02      FALSE                 0    Var24 clean
## 42  3.283203e-02      FALSE                 0    Var24 isBAD
## 43  1.871793e-02      FALSE                 0    Var25 clean
## 44  6.650215e-16      FALSE                 0    Var25 isBAD
## 45  8.131591e-01      FALSE                 0    Var26 clean
## 46  1.419659e-06      FALSE                 0    Var26 isBAD
## 47  4.453701e-01      FALSE                 0    Var27 clean
## 48  1.419659e-06      FALSE                 0    Var27 isBAD
## 49  2.576883e-03      FALSE                 0    Var28 clean
## 50  6.216094e-16      FALSE                 0    Var28 isBAD
## 51  3.997658e-01      FALSE                 0    Var29 clean
## 52  4.529984e-01      FALSE                 0    Var29 isBAD
## 53  8.526755e-01      FALSE                 0    Var30 clean
## 54  4.529984e-01      FALSE                 0    Var30 isBAD
## 55  8.218358e-01      FALSE                 0    Var33 clean
## 56  1.069230e-04      FALSE                 0    Var33 isBAD
## 57  2.481331e-01      FALSE                 0    Var34 clean
## 58  4.708216e-06      FALSE                 0    Var34 isBAD
## 59  6.384715e-02      FALSE                 0    Var35 clean
## 60  6.650215e-16      FALSE                 0    Var35 isBAD
## 61  8.308712e-01      FALSE                 0    Var36 clean
## 62  4.708216e-06      FALSE                 0    Var36 isBAD
## 63  7.051880e-01      FALSE                 0    Var37 clean
## 64  1.862012e-06      FALSE                 0    Var37 isBAD
## 65  1.377868e-01      FALSE                 0    Var38 clean
## 66  6.650215e-16      FALSE                 0    Var38 isBAD
## 67  6.865043e-01      FALSE                 0    Var40 clean
## 68  4.708216e-06      FALSE                 0    Var40 isBAD
## 69  8.896375e-01      FALSE                 0    Var41 clean
## 70  4.529984e-01      FALSE                 0    Var41 isBAD
## 71  9.368772e-01      FALSE                 0    Var43 clean
## 72  4.708216e-06      FALSE                 0    Var43 isBAD
## 73  6.515621e-01      FALSE                 0    Var44 clean
## 74  6.650215e-16      FALSE                 0    Var44 isBAD
## 75  3.862460e-01      FALSE                 0    Var45 clean
## 76  2.037797e-01      FALSE                 0    Var45 isBAD
## 77  6.375689e-01      FALSE                 0    Var46 clean
## 78  4.708216e-06      FALSE                 0    Var46 isBAD
## 79  6.770957e-01      FALSE                 0    Var47 clean
## 80  4.529984e-01      FALSE                 0    Var47 isBAD
## 81  5.199929e-01      FALSE                 0    Var49 clean
## 82  4.708216e-06      FALSE                 0    Var49 isBAD
## 83  5.624658e-01      FALSE                 0    Var50 clean
## 84  4.529984e-01      FALSE                 0    Var50 isBAD
## 85  1.451012e-01      FALSE                 0    Var51 clean
## 86  5.895954e-05      FALSE                 0    Var51 isBAD
## 87  1.419659e-01      FALSE                 0    Var53 clean
## 88  4.529984e-01      FALSE                 0    Var53 isBAD
## 89  8.323607e-01      FALSE                 0    Var54 clean
## 90  4.708216e-06      FALSE                 0    Var54 isBAD
## 91  8.017284e-01      FALSE                 0    Var56 clean
## 92  4.294514e-02      FALSE                 0    Var56 isBAD
## 93  1.196233e-01      FALSE                 0    Var57 clean
## 94  9.500667e-01      FALSE                 0    Var58 clean
## 95  4.529984e-01      FALSE                 0    Var58 isBAD
## 96  4.834119e-01      FALSE                 0    Var59 clean
## 97  2.014521e-02      FALSE                 0    Var59 isBAD
## 98  8.494907e-01      FALSE                 0    Var60 clean
## 99  1.419659e-06      FALSE                 0    Var60 isBAD
## 100 9.396293e-01      FALSE                 0    Var61 clean
## 101 1.069230e-04      FALSE                 0    Var61 isBAD
## 102 5.246557e-01      FALSE                 0    Var62 clean
## 103 7.958694e-01      FALSE                 0    Var62 isBAD
## 104 7.695258e-01      FALSE                 0    Var63 clean
## 105 5.016146e-01      FALSE                 0    Var63 isBAD
## 106 9.402750e-01      FALSE                 0    Var64 clean
## 107 1.933946e-01      FALSE                 0    Var64 isBAD
## 108 4.650316e-17      FALSE                 0    Var65 clean
## 109 4.938685e-12      FALSE                 0    Var65 isBAD
## 110 7.232170e-01      FALSE                 0    Var66 clean
## 111 5.016146e-01      FALSE                 0    Var66 isBAD
## 112 6.842271e-01      FALSE                 0    Var67 clean
## 113 1.419659e-06      FALSE                 0    Var67 isBAD
## 114 7.448982e-01      FALSE                 0    Var68 clean
## 115 4.708216e-06      FALSE                 0    Var68 isBAD
## 116 3.134760e-01      FALSE                 0    Var69 clean
## 117 1.419659e-06      FALSE                 0    Var69 isBAD
## 118 7.319862e-01      FALSE                 0    Var70 clean
## 119 1.419659e-06      FALSE                 0    Var70 isBAD
## 120 9.406609e-01      FALSE                 0    Var71 clean
## 121 8.505976e-06      FALSE                 0    Var71 isBAD
## 122 5.281298e-12      FALSE                 0    Var72 clean
## 123 1.082957e-01      FALSE                 0    Var72 isBAD
## 124 4.221817e-50      FALSE                 0    Var73 clean
## 125 1.142333e-34      FALSE                 0    Var74 clean
## 126 4.938685e-12      FALSE                 0    Var74 isBAD
## 127 5.766790e-01      FALSE                 0    Var75 clean
## 128 4.708216e-06      FALSE                 0    Var75 isBAD
## 129 1.258218e-01      FALSE                 0    Var76 clean
## 130 6.650215e-16      FALSE                 0    Var76 isBAD
## 131 3.869888e-01      FALSE                 0    Var77 clean
## 132 4.529984e-01      FALSE                 0    Var77 isBAD
## 133 5.539030e-01      FALSE                 0    Var78 clean
## 134 6.650215e-16      FALSE                 0    Var78 isBAD
## 135 8.666502e-01      FALSE                 0    Var80 clean
## 136 1.419659e-06      FALSE                 0    Var80 isBAD
## 137 1.954891e-12      FALSE                 0    Var81 clean
## 138 1.822398e-15      FALSE                 0    Var81 isBAD
## 139 6.062823e-02      FALSE                 0    Var82 clean
## 140 1.862012e-06      FALSE                 0    Var82 isBAD
## 141 8.666888e-01      FALSE                 0    Var83 clean
## 142 6.650215e-16      FALSE                 0    Var83 isBAD
## 143 6.994175e-01      FALSE                 0    Var84 clean
## 144 4.885833e-06      FALSE                 0    Var84 isBAD
## 145 1.604340e-02      FALSE                 0    Var85 clean
## 146 6.650215e-16      FALSE                 0    Var85 isBAD
## 147 6.330919e-01      FALSE                 0    Var86 clean
## 148 4.529984e-01      FALSE                 0    Var86 isBAD
## 149 5.909534e-01      FALSE                 0    Var87 clean
## 150 4.529984e-01      FALSE                 0    Var87 isBAD
## 151 8.070649e-01      FALSE                 0    Var88 clean
## 152 2.035268e-04      FALSE                 0    Var88 isBAD
## 153 5.913166e-01      FALSE                 0    Var89 clean
## 154 4.294514e-02      FALSE                 0    Var89 isBAD
## 155 6.519917e-01      FALSE                 0    Var90 clean
## 156 4.529984e-01      FALSE                 0    Var90 isBAD
## 157 9.406609e-01      FALSE                 0    Var91 clean
## 158 8.505976e-06      FALSE                 0    Var91 isBAD
## 159 5.102136e-01      FALSE                 0    Var92 clean
## 160 9.131691e-01      FALSE                 0    Var92 isBAD
## 161 8.799233e-01      FALSE                 0    Var93 clean
## 162 1.419659e-06      FALSE                 0    Var93 isBAD
## 163 3.040503e-03      FALSE                 0    Var94 clean
## 164 1.082957e-01      FALSE                 0    Var94 isBAD
## 165 8.740925e-01      FALSE                 0    Var95 clean
## 166 4.708216e-06      FALSE                 0    Var95 isBAD
## 167 9.791331e-01      FALSE                 0    Var96 clean
## 168 4.708216e-06      FALSE                 0    Var96 isBAD
## 169 5.104204e-01      FALSE                 0    Var97 clean
## 170 1.419659e-06      FALSE                 0    Var97 isBAD
## 171 5.196590e-01      FALSE                 0    Var98 clean
## 172 7.958694e-01      FALSE                 0    Var98 isBAD
## 173 8.074618e-01      FALSE                 0    Var99 clean
## 174 1.862012e-06      FALSE                 0    Var99 isBAD
## 175 3.622525e-01      FALSE                 0   Var100 clean
## 176 4.529984e-01      FALSE                 0   Var100 isBAD
## 177 9.132568e-01      FALSE                 0   Var101 clean
## 178 1.609703e-04      FALSE                 0   Var101 isBAD
## 179 8.995868e-01      FALSE                 0   Var102 clean
## 180 4.212975e-02      FALSE                 0   Var102 isBAD
## 181 9.833747e-01      FALSE                 0   Var103 clean
## 182 1.419659e-06      FALSE                 0   Var103 isBAD
## 183 9.008945e-01      FALSE                 0   Var104 clean
## 184 2.014521e-02      FALSE                 0   Var104 isBAD
## 185 9.008945e-01      FALSE                 0   Var105 clean
## 186 2.014521e-02      FALSE                 0   Var105 isBAD
## 187 9.832242e-01      FALSE                 0   Var106 clean
## 188 1.862012e-06      FALSE                 0   Var106 isBAD
## 189 9.052218e-01      FALSE                 0   Var107 clean
## 190 1.419659e-06      FALSE                 0   Var107 isBAD
## 191 4.496980e-01      FALSE                 0   Var108 clean
## 192 4.529984e-01      FALSE                 0   Var108 isBAD
## 193 1.821215e-01      FALSE                 0   Var109 clean
## 194 3.283203e-02      FALSE                 0   Var109 isBAD
## 195 1.182896e-01      FALSE                 0   Var110 clean
## 196 4.529984e-01      FALSE                 0   Var110 isBAD
## 197 5.100830e-01      FALSE                 0   Var111 clean
## 198 8.505976e-06      FALSE                 0   Var111 isBAD
## 199 1.461138e-01      FALSE                 0   Var112 clean
## 200 6.650215e-16      FALSE                 0   Var112 isBAD
## 201 3.397145e-35      FALSE                 0   Var113 clean
## 202 1.801976e-01      FALSE                 0   Var114 clean
## 203 4.708216e-06      FALSE                 0   Var114 isBAD
## 204 5.050064e-01      FALSE                 0   Var115 clean
## 205 2.014521e-02      FALSE                 0   Var115 isBAD
## 206 8.816889e-01      FALSE                 0   Var116 clean
## 207 4.529984e-01      FALSE                 0   Var116 isBAD
## 208 5.088379e-01      FALSE                 0   Var117 clean
## 209 1.862012e-06      FALSE                 0   Var117 isBAD
## 210 9.131691e-01      FALSE                 0   Var118 isBAD
## 211 2.755317e-02      FALSE                 0   Var119 clean
## 212 1.822398e-15      FALSE                 0   Var119 isBAD
## 213 9.554935e-01      FALSE                 0   Var120 clean
## 214 1.419659e-06      FALSE                 0   Var120 isBAD
## 215 9.468560e-01      FALSE                 0   Var121 clean
## 216 4.529984e-01      FALSE                 0   Var121 isBAD
## 217 5.330364e-01      FALSE                 0   Var122 clean
## 218 4.708216e-06      FALSE                 0   Var122 isBAD
## 219 8.512207e-01      FALSE                 0   Var123 clean
## 220 6.650215e-16      FALSE                 0   Var123 isBAD
## 221 8.426307e-01      FALSE                 0   Var124 clean
## 222 1.862012e-06      FALSE                 0   Var124 isBAD
## 223 1.240769e-06      FALSE                 0   Var125 clean
## 224 4.938685e-12      FALSE                 0   Var125 isBAD
## 225 1.016548e-18      FALSE                 0   Var126 clean
## 226 3.089900e-73      FALSE                 0   Var126 isBAD
## 227 9.526229e-01      FALSE                 0   Var127 clean
## 228 2.035268e-04      FALSE                 0   Var127 isBAD
## 229 8.070649e-01      FALSE                 0   Var128 clean
## 230 2.035268e-04      FALSE                 0   Var128 isBAD
## 231 8.423695e-01      FALSE                 0   Var129 clean
## 232 4.529984e-01      FALSE                 0   Var129 isBAD
## 233 6.175541e-02      FALSE                 0   Var130 clean
## 234 4.885833e-06      FALSE                 0   Var130 isBAD
## 235 1.474015e-01      FALSE                 0   Var131 clean
## 236 4.529984e-01      FALSE                 0   Var131 isBAD
## 237 1.146808e-01      FALSE                 0   Var132 clean
## 238 6.650215e-16      FALSE                 0   Var132 isBAD
## 239 9.205745e-01      FALSE                 0   Var133 clean
## 240 6.650215e-16      FALSE                 0   Var133 isBAD
## 241 2.869840e-01      FALSE                 0   Var134 clean
## 242 6.650215e-16      FALSE                 0   Var134 isBAD
## 243 9.381591e-01      FALSE                 0   Var135 clean
## 244 1.862012e-06      FALSE                 0   Var135 isBAD
## 245 2.068155e-01      FALSE                 0   Var136 clean
## 246 5.016146e-01      FALSE                 0   Var136 isBAD
## 247 6.449236e-01      FALSE                 0   Var137 clean
## 248 4.529984e-01      FALSE                 0   Var137 isBAD
## 249 8.520043e-01      FALSE                 0   Var138 clean
## 250 1.862012e-06      FALSE                 0   Var138 isBAD
## 251 3.492143e-02      FALSE                 0   Var139 clean
## 252 1.419659e-06      FALSE                 0   Var139 isBAD
## 253 4.744656e-17      FALSE                 0   Var140 clean
## 254 4.938685e-12      FALSE                 0   Var140 isBAD
## 255 1.548562e-01      FALSE                 0   Var142 clean
## 256 4.529984e-01      FALSE                 0   Var142 isBAD
## 257 2.680228e-02      FALSE                 0   Var143 clean
## 258 6.650215e-16      FALSE                 0   Var143 isBAD
## 259 8.900620e-30      FALSE                 0   Var144 clean
## 260 1.822398e-15      FALSE                 0   Var144 isBAD
## 261 8.188110e-01      FALSE                 0   Var145 clean
## 262 1.862012e-06      FALSE                 0   Var145 isBAD
## 263 8.568031e-01      FALSE                 0   Var146 clean
## 264 1.419659e-06      FALSE                 0   Var146 isBAD
## 265 2.938475e-01      FALSE                 0   Var147 clean
## 266 1.419659e-06      FALSE                 0   Var147 isBAD
## 267 9.401887e-01      FALSE                 0   Var148 clean
## 268 1.419659e-06      FALSE                 0   Var148 isBAD
## 269 7.314142e-03      FALSE                 0   Var149 clean
## 270 3.283203e-02      FALSE                 0   Var149 isBAD
## 271 9.022465e-01      FALSE                 0   Var150 clean
## 272 1.862012e-06      FALSE                 0   Var150 isBAD
## 273 9.380727e-01      FALSE                 0   Var151 clean
## 274 1.069230e-04      FALSE                 0   Var151 isBAD
## 275 8.730887e-01      FALSE                 0   Var152 clean
## 276 1.862012e-06      FALSE                 0   Var152 isBAD
## 277 9.003705e-02      FALSE                 0   Var153 clean
## 278 6.650215e-16      FALSE                 0   Var153 isBAD
## 279 5.678110e-01      FALSE                 0   Var154 clean
## 280 4.529984e-01      FALSE                 0   Var154 isBAD
## 281 9.893070e-01      FALSE                 0   Var155 clean
## 282 1.862012e-06      FALSE                 0   Var155 isBAD
## 283 7.232170e-01      FALSE                 0   Var156 clean
## 284 5.016146e-01      FALSE                 0   Var156 isBAD
## 285 8.228076e-01      FALSE                 0   Var157 clean
## 286 8.505976e-06      FALSE                 0   Var157 isBAD
## 287 9.410387e-01      FALSE                 0   Var158 clean
## 288 1.609703e-04      FALSE                 0   Var158 isBAD
## 289 9.823880e-01      FALSE                 0   Var159 clean
## 290 4.708216e-06      FALSE                 0   Var159 isBAD
## 291 5.977602e-03      FALSE                 0   Var160 clean
## 292 6.650215e-16      FALSE                 0   Var160 isBAD
## 293 3.160734e-01      FALSE                 0   Var161 clean
## 294 1.862012e-06      FALSE                 0   Var161 isBAD
## 295 5.769463e-01      FALSE                 0   Var162 clean
## 296 4.708216e-06      FALSE                 0   Var162 isBAD
## 297 4.873034e-01      FALSE                 0   Var163 clean
## 298 6.650215e-16      FALSE                 0   Var163 isBAD
## 299 7.113866e-01      FALSE                 0   Var164 clean
## 300 1.862012e-06      FALSE                 0   Var164 isBAD
## 301 8.730784e-01      FALSE                 0   Var165 clean
## 302 1.609703e-04      FALSE                 0   Var165 isBAD
## 303 9.690297e-01      FALSE                 0   Var166 clean
## 304 1.419659e-06      FALSE                 0   Var166 isBAD
## 305 1.250505e-02      FALSE                 0   Var168 clean
## 306 4.529984e-01      FALSE                 0   Var168 isBAD
## 307 5.107866e-01      FALSE                 0   Var170 clean
## 308 4.708216e-06      FALSE                 0   Var170 isBAD
## 309 8.303872e-01      FALSE                 0   Var171 clean
## 310 2.035268e-04      FALSE                 0   Var171 isBAD
## 311 4.570958e-01      FALSE                 0   Var172 clean
## 312 1.419659e-06      FALSE                 0   Var172 isBAD
## 313 2.412398e-02      FALSE                 0   Var173 clean
## 314 6.650215e-16      FALSE                 0   Var173 isBAD
## 315 6.481659e-01      FALSE                 0   Var174 clean
## 316 1.862012e-06      FALSE                 0   Var174 isBAD
## 317 5.014708e-01      FALSE                 0   Var176 clean
## 318 4.885833e-06      FALSE                 0   Var176 isBAD
## 319 1.286309e-01      FALSE                 0   Var177 clean
## 320 4.708216e-06      FALSE                 0   Var177 isBAD
## 321 5.505067e-01      FALSE                 0   Var178 clean
## 322 4.294514e-02      FALSE                 0   Var178 isBAD
## 323 8.971566e-01      FALSE                 0   Var179 clean
## 324 1.862012e-06      FALSE                 0   Var179 isBAD
## 325 8.457465e-01      FALSE                 0   Var180 clean
## 326 4.529984e-01      FALSE                 0   Var180 isBAD
## 327 8.072579e-01      FALSE                 0   Var181 clean
## 328 6.650215e-16      FALSE                 0   Var181 isBAD
## 329 9.562394e-01      FALSE                 0   Var182 clean
## 330 1.862012e-06      FALSE                 0   Var182 isBAD
## 331 7.838545e-01      FALSE                 0   Var183 clean
## 332 4.708216e-06      FALSE                 0   Var183 isBAD
## 333 7.155066e-01      FALSE                 0   Var184 clean
## 334 4.708216e-06      FALSE                 0   Var184 isBAD
## 335 8.510361e-01      FALSE                 0   Var186 clean
## 336 4.529984e-01      FALSE                 0   Var186 isBAD
## 337 6.159631e-01      FALSE                 0   Var187 clean
## 338 4.529984e-01      FALSE                 0   Var187 isBAD
## 339 5.453843e-02      FALSE                 0   Var188 clean
## 340 4.708216e-06      FALSE                 0   Var188 isBAD
## 341 1.291969e-64      FALSE                 0   Var189 clean
## 342 1.970811e-01      FALSE                 0   Var189 isBAD
## 343 5.455177e-01      FALSE                 0   Var190 clean
## 344 1.930716e-01      FALSE                 0   Var190 isBAD
## 345 6.591365e-02       TRUE                 1   Var191 poolC
## 346 2.035268e-04      FALSE                 0   Var191   lev
## 347 2.035268e-04      FALSE                 0   Var191   lev
## 348 1.021537e-26       TRUE               354   Var192 poolC
## 349 1.122196e-37       TRUE                49   Var193 poolC
## 350 4.037365e-22      FALSE                 0   Var193   lev
## 351 4.739646e-04      FALSE                 0   Var193   lev
## 352 1.876226e-40      FALSE                 0   Var193   lev
## 353 2.157581e-04       TRUE                 3   Var194 poolC
## 354 6.161267e-05      FALSE                 0   Var194   lev
## 355 8.513717e-05      FALSE                 0   Var194   lev
## 356 1.801134e-06       TRUE                22   Var195 poolC
## 357 5.902705e-06      FALSE                 0   Var195   lev
## 358 9.389575e-02      FALSE                 0   Var196   lev
## 359 1.084298e-07       TRUE               220   Var197 poolC
## 360 1.280985e-02      FALSE                 0   Var197   lev
## 361 6.156225e-02      FALSE                 0   Var197   lev
## 362 2.873384e-01      FALSE                 0   Var197   lev
## 363 6.509410e-01      FALSE                 0   Var197   lev
## 364 3.997540e-03      FALSE                 0   Var197   lev
## 365 4.804164e-02      FALSE                 0   Var197   lev
## 366 4.879473e-32       TRUE              4093   Var198 poolC
## 367 1.586589e-20      FALSE                 0   Var198   lev
## 368 1.178434e-02      FALSE                 0   Var198   lev
## 369 1.537595e-52       TRUE              4721   Var199 poolC
## 370 6.758086e-21       TRUE             14390   Var200 poolC
## 371 9.625925e-29      FALSE                 0   Var200   lev
## 372 1.805891e-04       TRUE                 2   Var201 poolC
## 373 6.239981e-05      FALSE                 0   Var201   lev
## 374 5.556270e-05      FALSE                 0   Var201   lev
## 375 8.151677e-11       TRUE              5635   Var202 poolC
## 376 7.017074e-01       TRUE                 5   Var203 poolC
## 377 2.457481e-02      FALSE                 0   Var203   lev
## 378 5.199863e-02      FALSE                 0   Var203   lev
## 379 1.011029e-01      FALSE                 0   Var203   lev
## 380 3.856700e-14       TRUE                99   Var204 poolC
## 381 1.902608e-01      FALSE                 0   Var204   lev
## 382 5.465477e-01      FALSE                 0   Var204   lev
## 383 6.555689e-01      FALSE                 0   Var204   lev
## 384 2.657181e-01      FALSE                 0   Var204   lev
## 385 9.835793e-01      FALSE                 0   Var204   lev
## 386 2.412547e-03      FALSE                 0   Var204   lev
## 387 3.201938e-01      FALSE                 0   Var204   lev
## 388 6.707372e-03      FALSE                 0   Var204   lev
## 389 1.120507e-01      FALSE                 0   Var204   lev
## 390 3.144715e-03      FALSE                 0   Var204   lev
## 391 2.774170e-40       TRUE                 3   Var205 poolC
## 392 3.520832e-01      FALSE                 0   Var205   lev
## 393 2.208737e-03      FALSE                 0   Var205   lev
## 394 4.297525e-43      FALSE                 0   Var205   lev
## 395 4.100066e-11      FALSE                 0   Var205   lev
## 396 4.454622e-69       TRUE                21   Var206 poolC
## 397 1.822398e-15      FALSE                 0   Var206   lev
## 398 1.959477e-01      FALSE                 0   Var206   lev
## 399 1.236047e-02      FALSE                 0   Var206   lev
## 400 5.468636e-08      FALSE                 0   Var206   lev
## 401 8.746431e-12      FALSE                 0   Var206   lev
## 402 3.285526e-23      FALSE                 0   Var206   lev
## 403 8.274335e-06      FALSE                 0   Var206   lev
## 404 1.925194e-01      FALSE                 0   Var206   lev
## 405 2.194114e-01      FALSE                 0   Var206   lev
## 406 7.699583e-14      FALSE                 0   Var206   lev
## 407 5.300895e-14      FALSE                 0   Var206   lev
## 408 1.435083e-33       TRUE                13   Var207 poolC
## 409 5.394318e-24      FALSE                 0   Var207   lev
## 410 2.898618e-08      FALSE                 0   Var207   lev
## 411 9.950412e-01      FALSE                 0   Var207   lev
## 412 4.811175e-01      FALSE                 0   Var207   lev
## 413 1.389566e-27      FALSE                 0   Var207   lev
## 414 2.653449e-02      FALSE                 0   Var207   lev
## 415 1.042969e-01       TRUE                 2   Var208 poolC
## 416 1.448640e-01      FALSE                 0   Var208   lev
## 417 8.562110e-02      FALSE                 0   Var208   lev
## 418 2.722582e-22       TRUE                 5   Var210 poolC
## 419 2.862852e-16      FALSE                 0   Var210   lev
## 420 7.611924e-17      FALSE                 0   Var210   lev
## 421 1.528368e-11       TRUE                 1   Var211 poolC
## 422 7.064698e-12      FALSE                 0   Var211   lev
## 423 7.064698e-12      FALSE                 0   Var211   lev
## 424 2.975618e-59       TRUE                78   Var212 poolC
## 425 1.021609e-06      FALSE                 0   Var212   lev
## 426 8.613110e-08      FALSE                 0   Var212   lev
## 427 7.806058e-01      FALSE                 0   Var212   lev
## 428 1.096606e-02      FALSE                 0   Var212   lev
## 429 1.170222e-54      FALSE                 0   Var212   lev
## 430 1.074954e-17      FALSE                 0   Var212   lev
## 431 2.089801e-04       TRUE                 1   Var213 poolC
## 432 8.505976e-06      FALSE                 0   Var213   lev
## 433 8.505976e-06      FALSE                 0   Var213   lev
## 434 6.757999e-21       TRUE             14390   Var214 poolC
## 435 9.625925e-29      FALSE                 0   Var214   lev
## 436 5.016146e-01      FALSE                 0   Var215   lev
## 437 5.659189e-87       TRUE              1926   Var216 poolC
## 438 3.024677e-02      FALSE                 0   Var216   lev
## 439 5.529768e-01      FALSE                 0   Var216   lev
## 440 8.818825e-03      FALSE                 0   Var216   lev
## 441 1.515818e-03      FALSE                 0   Var216   lev
## 442 1.151189e-02      FALSE                 0   Var216   lev
## 443 3.523563e-01      FALSE                 0   Var216   lev
## 444 3.831746e-02      FALSE                 0   Var216   lev
## 445 5.534288e-15      FALSE                 0   Var216   lev
## 446 2.053121e-55       TRUE             13222   Var217 poolC
## 447 4.046158e-65       TRUE                 2   Var218 poolC
## 448 1.064714e-28      FALSE                 0   Var218   lev
## 449 1.028586e-11      FALSE                 0   Var218   lev
## 450 9.069035e-03       TRUE                22   Var219 poolC
## 451 3.455312e-01      FALSE                 0   Var219   lev
## 452 3.901751e-03      FALSE                 0   Var219   lev
## 453 1.787239e-02      FALSE                 0   Var219   lev
## 454 7.005496e-01      FALSE                 0   Var219   lev
## 455 4.879412e-32       TRUE              4093   Var220 poolC
## 456 1.586589e-20      FALSE                 0   Var220   lev
## 457 1.178434e-02      FALSE                 0   Var220   lev
## 458 1.641357e-22       TRUE                 6   Var221 poolC
## 459 9.783400e-01      FALSE                 0   Var221   lev
## 460 2.329916e-08      FALSE                 0   Var221   lev
## 461 1.188016e-20      FALSE                 0   Var221   lev
## 462 1.699119e-06      FALSE                 0   Var221   lev
## 463 1.187931e-08      FALSE                 0   Var221   lev
## 464 4.879386e-32       TRUE              4093   Var222 poolC
## 465 1.178434e-02      FALSE                 0   Var222   lev
## 466 1.586589e-20      FALSE                 0   Var222   lev
## 467 6.795578e-02       TRUE                 4   Var223 poolC
## 468 3.455312e-01      FALSE                 0   Var223   lev
## 469 4.940328e-01      FALSE                 0   Var223   lev
## 470 9.431963e-01      FALSE                 0   Var223   lev
## 471 9.212519e-01      FALSE                 0   Var223   lev
## 472 1.287169e-01       TRUE                 1   Var224 poolC
## 473 2.014521e-02      FALSE                 0   Var224   lev
## 474 1.329919e-31       TRUE                 3   Var225 poolC
## 475 2.137222e-29      FALSE                 0   Var225   lev
## 476 4.193752e-22      FALSE                 0   Var225   lev
## 477 4.614202e-03      FALSE                 0   Var225   lev
## 478 4.125449e-03      FALSE                 0   Var225   lev
## 479 5.789241e-16       TRUE                22   Var226 poolC
## 480 5.704263e-01      FALSE                 0   Var226   lev
## 481 8.798144e-01      FALSE                 0   Var226   lev
## 482 4.555151e-01      FALSE                 0   Var226   lev
## 483 2.861099e-01      FALSE                 0   Var226   lev
## 484 4.617143e-07      FALSE                 0   Var226   lev
## 485 1.826908e-01      FALSE                 0   Var226   lev
## 486 7.964860e-01      FALSE                 0   Var226   lev
## 487 1.918030e-10      FALSE                 0   Var226   lev
## 488 1.599428e-01      FALSE                 0   Var226   lev
## 489 3.786301e-03      FALSE                 0   Var226   lev
## 490 6.991124e-02      FALSE                 0   Var226   lev
## 491 1.312678e-01      FALSE                 0   Var226   lev
## 492 3.602696e-02      FALSE                 0   Var226   lev
## 493 3.396179e-01      FALSE                 0   Var226   lev
## 494 2.278658e-04      FALSE                 0   Var226   lev
## 495 3.447014e-01      FALSE                 0   Var226   lev
## 496 1.991424e-02      FALSE                 0   Var226   lev
## 497 5.974096e-01      FALSE                 0   Var226   lev
## 498 1.390213e-02      FALSE                 0   Var226   lev
## 499 7.436876e-01      FALSE                 0   Var226   lev
## 500 1.004617e-31       TRUE                 6   Var227 poolC
## 501 2.410784e-03      FALSE                 0   Var227   lev
## 502 2.948771e-01      FALSE                 0   Var227   lev
## 503 4.602414e-04      FALSE                 0   Var227   lev
## 504 2.927722e-27      FALSE                 0   Var227   lev
## 505 1.825722e-24      FALSE                 0   Var227   lev
## 506 1.312363e-46       TRUE                28   Var228 poolC
## 507 9.148369e-10      FALSE                 0   Var228   lev
## 508 2.261755e-42      FALSE                 0   Var228   lev
## 509 8.780686e-13      FALSE                 0   Var228   lev
## 510 2.923118e-09      FALSE                 0   Var228   lev
## 511 5.551966e-05      FALSE                 0   Var228   lev
## 512 4.796431e-08      FALSE                 0   Var228   lev
## 513 6.208915e-01      FALSE                 0   Var228   lev
## 514 2.623535e-36       TRUE                 4   Var229 poolC
## 515 3.635024e-38      FALSE                 0   Var229   lev
## 516 4.398543e-16      FALSE                 0   Var229   lev
## 517 2.190401e-14      FALSE                 0   Var229   lev
selvars <- treatmentsC$scoreFrame$varName[treatmentsC$scoreFrame$sig<=kddSig]
treatedTrain[[yName]] = treatedTrain[[yName]]==yTarget

treatedTest = prepare(treatmentsC,
                      dTest,
                      pruneSig=c(),
                      varRestriction=selvars,
                      parallelCluster=cl)
treatedTest[[yName]] = treatedTest[[yName]]==yTarget

base::date()
## [1] "Thu Aug 10 22:49:36 2017"
# Run other models (with proper coding/training separation).
#
# This gets us back to AUC 0.72

print(selvars)
##   [1] "Var2_isBAD"                            
##   [2] "Var3_isBAD"                            
##   [3] "Var4_isBAD"                            
##   [4] "Var5_isBAD"                            
##   [5] "Var6_clean"                            
##   [6] "Var6_isBAD"                            
##   [7] "Var7_clean"                            
##   [8] "Var7_isBAD"                            
##   [9] "Var10_isBAD"                           
##  [10] "Var11_isBAD"                           
##  [11] "Var13_clean"                           
##  [12] "Var13_isBAD"                           
##  [13] "Var14_isBAD"                           
##  [14] "Var16_isBAD"                           
##  [15] "Var17_isBAD"                           
##  [16] "Var18_isBAD"                           
##  [17] "Var19_isBAD"                           
##  [18] "Var21_isBAD"                           
##  [19] "Var22_isBAD"                           
##  [20] "Var23_isBAD"                           
##  [21] "Var25_isBAD"                           
##  [22] "Var26_isBAD"                           
##  [23] "Var27_isBAD"                           
##  [24] "Var28_isBAD"                           
##  [25] "Var33_isBAD"                           
##  [26] "Var34_isBAD"                           
##  [27] "Var35_isBAD"                           
##  [28] "Var36_isBAD"                           
##  [29] "Var37_isBAD"                           
##  [30] "Var38_isBAD"                           
##  [31] "Var40_isBAD"                           
##  [32] "Var43_isBAD"                           
##  [33] "Var44_isBAD"                           
##  [34] "Var46_isBAD"                           
##  [35] "Var49_isBAD"                           
##  [36] "Var51_isBAD"                           
##  [37] "Var54_isBAD"                           
##  [38] "Var60_isBAD"                           
##  [39] "Var61_isBAD"                           
##  [40] "Var65_clean"                           
##  [41] "Var65_isBAD"                           
##  [42] "Var67_isBAD"                           
##  [43] "Var68_isBAD"                           
##  [44] "Var69_isBAD"                           
##  [45] "Var70_isBAD"                           
##  [46] "Var71_isBAD"                           
##  [47] "Var72_clean"                           
##  [48] "Var73_clean"                           
##  [49] "Var74_clean"                           
##  [50] "Var74_isBAD"                           
##  [51] "Var75_isBAD"                           
##  [52] "Var76_isBAD"                           
##  [53] "Var78_isBAD"                           
##  [54] "Var80_isBAD"                           
##  [55] "Var81_clean"                           
##  [56] "Var81_isBAD"                           
##  [57] "Var82_isBAD"                           
##  [58] "Var83_isBAD"                           
##  [59] "Var84_isBAD"                           
##  [60] "Var85_isBAD"                           
##  [61] "Var91_isBAD"                           
##  [62] "Var93_isBAD"                           
##  [63] "Var95_isBAD"                           
##  [64] "Var96_isBAD"                           
##  [65] "Var97_isBAD"                           
##  [66] "Var99_isBAD"                           
##  [67] "Var101_isBAD"                          
##  [68] "Var103_isBAD"                          
##  [69] "Var106_isBAD"                          
##  [70] "Var107_isBAD"                          
##  [71] "Var111_isBAD"                          
##  [72] "Var112_isBAD"                          
##  [73] "Var113_clean"                          
##  [74] "Var114_isBAD"                          
##  [75] "Var117_isBAD"                          
##  [76] "Var119_isBAD"                          
##  [77] "Var120_isBAD"                          
##  [78] "Var122_isBAD"                          
##  [79] "Var123_isBAD"                          
##  [80] "Var124_isBAD"                          
##  [81] "Var125_clean"                          
##  [82] "Var125_isBAD"                          
##  [83] "Var126_clean"                          
##  [84] "Var126_isBAD"                          
##  [85] "Var130_isBAD"                          
##  [86] "Var132_isBAD"                          
##  [87] "Var133_isBAD"                          
##  [88] "Var134_isBAD"                          
##  [89] "Var135_isBAD"                          
##  [90] "Var138_isBAD"                          
##  [91] "Var139_isBAD"                          
##  [92] "Var140_clean"                          
##  [93] "Var140_isBAD"                          
##  [94] "Var143_isBAD"                          
##  [95] "Var144_clean"                          
##  [96] "Var144_isBAD"                          
##  [97] "Var145_isBAD"                          
##  [98] "Var146_isBAD"                          
##  [99] "Var147_isBAD"                          
## [100] "Var148_isBAD"                          
## [101] "Var150_isBAD"                          
## [102] "Var151_isBAD"                          
## [103] "Var152_isBAD"                          
## [104] "Var153_isBAD"                          
## [105] "Var155_isBAD"                          
## [106] "Var157_isBAD"                          
## [107] "Var158_isBAD"                          
## [108] "Var159_isBAD"                          
## [109] "Var160_isBAD"                          
## [110] "Var161_isBAD"                          
## [111] "Var162_isBAD"                          
## [112] "Var163_isBAD"                          
## [113] "Var164_isBAD"                          
## [114] "Var165_isBAD"                          
## [115] "Var166_isBAD"                          
## [116] "Var170_isBAD"                          
## [117] "Var172_isBAD"                          
## [118] "Var173_isBAD"                          
## [119] "Var174_isBAD"                          
## [120] "Var176_isBAD"                          
## [121] "Var177_isBAD"                          
## [122] "Var179_isBAD"                          
## [123] "Var181_isBAD"                          
## [124] "Var182_isBAD"                          
## [125] "Var183_isBAD"                          
## [126] "Var184_isBAD"                          
## [127] "Var188_isBAD"                          
## [128] "Var189_clean"                          
## [129] "Var192_poolC"                          
## [130] "Var193_poolC"                          
## [131] "Var193_lev_x.2Knk1KF"                  
## [132] "Var193_lev_x.RO12"                     
## [133] "Var194_lev_NA"                         
## [134] "Var194_lev_x.SEuy"                     
## [135] "Var195_poolC"                          
## [136] "Var195_lev_x.taul"                     
## [137] "Var197_poolC"                          
## [138] "Var198_poolC"                          
## [139] "Var198_lev_x.fhk21Ss"                  
## [140] "Var199_poolC"                          
## [141] "Var200_poolC"                          
## [142] "Var200_lev_NA"                         
## [143] "Var201_poolC"                          
## [144] "Var201_lev_NA"                         
## [145] "Var201_lev_x.smXZ"                     
## [146] "Var202_poolC"                          
## [147] "Var204_poolC"                          
## [148] "Var205_poolC"                          
## [149] "Var205_lev_x.sJzTlal"                  
## [150] "Var205_lev_x.VpdQ"                     
## [151] "Var206_poolC"                          
## [152] "Var206_lev_NA"                         
## [153] "Var206_lev_x.hAFG"                     
## [154] "Var206_lev_x.haYg"                     
## [155] "Var206_lev_x.IYzP"                     
## [156] "Var206_lev_x.kxE9"                     
## [157] "Var206_lev_x.y6dw"                     
## [158] "Var206_lev_x.zm5i"                     
## [159] "Var207_poolC"                          
## [160] "Var207_lev_x.7M47J5GA0pTYIFxg5uy"      
## [161] "Var207_lev_x.DHn_WUyBhW_whjA88g9bvA64_"
## [162] "Var207_lev_x.me75fM6ugJ"               
## [163] "Var210_poolC"                          
## [164] "Var210_lev_x.g5HH"                     
## [165] "Var210_lev_x.uKAI"                     
## [166] "Var211_poolC"                          
## [167] "Var211_lev_x.L84s"                     
## [168] "Var211_lev_x.Mtgm"                     
## [169] "Var212_poolC"                          
## [170] "Var212_lev_x.4kVnq_T26xq1p"            
## [171] "Var212_lev_x.CrNX"                     
## [172] "Var212_lev_x.NhsEn4L"                  
## [173] "Var212_lev_x.XfqtO3UdzaXh_"            
## [174] "Var213_lev_NA"                         
## [175] "Var213_lev_x.KdSa"                     
## [176] "Var214_poolC"                          
## [177] "Var214_lev_NA"                         
## [178] "Var216_poolC"                          
## [179] "Var216_lev_x.XTbPUYD"                  
## [180] "Var217_poolC"                          
## [181] "Var218_poolC"                          
## [182] "Var218_lev_x.cJvF"                     
## [183] "Var218_lev_x.UYBR"                     
## [184] "Var220_poolC"                          
## [185] "Var220_lev_x.4UxGlow"                  
## [186] "Var221_poolC"                          
## [187] "Var221_lev_x.d0EEeJi"                  
## [188] "Var221_lev_x.oslk"                     
## [189] "Var221_lev_x.QKW8DRm"                  
## [190] "Var221_lev_x.zCkv"                     
## [191] "Var222_poolC"                          
## [192] "Var222_lev_x.catzS2D"                  
## [193] "Var225_poolC"                          
## [194] "Var225_lev_NA"                         
## [195] "Var225_lev_x.ELof"                     
## [196] "Var226_poolC"                          
## [197] "Var226_lev_x.7P5s"                     
## [198] "Var226_lev_x.FSa2"                     
## [199] "Var227_poolC"                          
## [200] "Var227_lev_x.RAYp"                     
## [201] "Var227_lev_x.ZI9m"                     
## [202] "Var228_poolC"                          
## [203] "Var228_lev_x.55YFVY9"                  
## [204] "Var228_lev_x.F2FyR07IdsN7I"            
## [205] "Var228_lev_x.ib5G6X1eUxUn6"            
## [206] "Var228_lev_x.iyHGyLCEkQ"               
## [207] "Var228_lev_x.R4y5gQQWY8OodqDV"         
## [208] "Var228_lev_x.TCU50_Yjmm6GIBZ0lL_"      
## [209] "Var229_poolC"                          
## [210] "Var229_lev_NA"                         
## [211] "Var229_lev_x.am7c"                     
## [212] "Var229_lev_x.mj86"
# prepare plotting frames
treatedTrainP = treatedTrain[, yName, drop=FALSE]
treatedTestP = treatedTest[, yName, drop=FALSE]

GBM

base::date()
## [1] "Thu Aug 10 22:49:36 2017"
formulaS = paste(yName,paste(selvars,collapse=' + '),sep=' ~ ')
mname='gbm'
print(date())
## [1] "Thu Aug 10 22:49:36 2017"
print(paste(mname,length(selvars)))
## [1] "gbm 212"
modelGBMs = gbm(as.formula(formulaS),
                data=treatedTrain,
                distribution='bernoulli',
                n.trees=2000,
                interaction.depth=3,
                keep.data=FALSE,
                cv.folds=5)
#print(modelGBMs)
#print(summary(modelGBMs))
nTrees = gbm.perf(modelGBMs)
## Using cv method...

treatedTrainP[[mname]] = predict(modelGBMs,newdata=treatedTrain,type='response',
                                 n.trees=nTrees) 
treatedTestP[[mname]] = predict(modelGBMs,newdata=treatedTest,type='response',
                                n.trees=nTrees)

t2 = paste(mname,'test data')
print(DoubleDensityPlot(treatedTestP, mname, yName, 
                        title=t2))

print(ROCPlot(treatedTestP, mname, yName, yTarget,
              title=t2))

print(date())
## [1] "Thu Aug 10 23:52:08 2017"

randomForest

print(date())
## [1] "Thu Aug 10 23:52:08 2017"
mname <- 'randomForest'
model <- randomForest(x=treatedTrain[,selvars,drop=FALSE],
                      y=as.factor(as.character(treatedTrain[[yName]])),
                      ntree=2000)
print(model)
## 
## Call:
##  randomForest(x = treatedTrain[, selvars, drop = FALSE], y = as.factor(as.character(treatedTrain[[yName]])),      ntree = 2000) 
##                Type of random forest: classification
##                      Number of trees: 2000
## No. of variables tried at each split: 14
## 
##         OOB estimate of  error rate: 7.36%
## Confusion matrix:
##       FALSE TRUE  class.error
## FALSE 41705    4 9.590256e-05
## TRUE   3309   10 9.969870e-01
treatedTrainP[[mname]]  <- predict(model,newdata=treatedTrain[,selvars,drop=FALSE],
                                  type='prob')[,'TRUE',drop=TRUE]
treatedTestP[[mname]]  <- predict(model,newdata=treatedTest[,selvars,drop=FALSE],
                                  type='prob')[,'TRUE',drop=TRUE]
t2 = paste(mname,'test data')
print(DoubleDensityPlot(treatedTestP, mname, yName, 
                        title=t2))

print(ROCPlot(treatedTestP, mname, yName, yTarget,
              title=t2))

print(date())
## [1] "Fri Aug 11 01:01:49 2017"

save for mutual plots

saveRDS(list(treatedTrainP=treatedTrainP,
             treatedTestP=treatedTestP),
        file='KDD2009preds.RDS')
if(!is.null(cl)) {
    parallel::stopCluster(cl)
    cl = NULL
}