zachmayer / caretEnsemble

caret models all the way down :turtle:
Other
226 stars 75 forks source link

test issue #195

Closed zachmayer closed 8 years ago

zachmayer commented 8 years ago
set.seed(1)
dat <- caret::twoClassSim(100)
X <- dat[,1:5]
y <- dat[["Class"]]

Minimal, runnable code:

library(caretEnsemble)
models <- caretList(
  X, y, 
  methodList=c('glm', 'rpart'),
  trControl=trainControl(
    method="cv", 
    number=5,
    classProbs=TRUE, 
    savePredictions="final")
)
ens <- caretStack(models)
print(ens)

Session Info:

>sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin14.5.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  splines   stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] rpart_4.1-10        caret_6.0-64        ggplot2_2.0.0       caretEnsemble_2.0.0 Matrix_1.2-3       
 [6] data.table_1.9.6    gbm_2.1.1           lattice_0.20-33     survival_2.38-3     randomForest_4.6-12

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.3        compiler_3.2.3     nloptr_1.0.4       plyr_1.8.3         iterators_1.0.8    class_7.3-14      
 [7] tools_3.2.3        lme4_1.1-10        digest_0.6.9       nlme_3.1-122       gtable_0.1.2       mgcv_1.8-9        
[13] foreach_1.4.3      SparseM_1.7        gridExtra_2.0.0    e1071_1.6-7        stringr_1.0.0      MatrixModels_0.4-1
[19] stats4_3.2.3       grid_3.2.3         nnet_7.3-11        pbapply_1.1-3      minqa_1.2.4        reshape2_1.4.1    
[25] car_2.1-1          magrittr_1.5       scales_0.3.0       codetools_0.2-14   MASS_7.3-45        pbkrtest_0.4-6    
[31] colorspace_1.2-6   quantreg_5.21      stringi_1.0-1      munsell_0.4.3      chron_2.3-47