zachmayer / caretEnsemble

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

caretStack multiclass problems #231

Closed mario-metriplica closed 6 years ago

mario-metriplica commented 6 years ago

I need to ensemble several models for multiclass problem. So, I'm using caretEnsemblepackage, specific caretStackfunction for stacking models.

Reproducing problem:

set.seed(1)
library(caret)
library(caretEnsemble)
data(iris)
weaklearners = caretList(
                         x=iris[,1:2],
                         y=iris[,3],
                         trControl=trainControl(method="cv"),
                         methodList=c("rpart", "pls")
                         )

stronglearner = caretStack(weaklearners, method="rf")

Error message:

Error in check_caretList_model_types(list_of_models) : 
  Not yet implemented for multiclass problems

Has caretEnsemblepackage implemented ensemble algorithms for multiclass problems?

Session Info:

> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
other attached packages:
[1] caretEnsemble_2.0.0   caret_6.0-76        ggplot2_2.2.1       lattice_0.20-34    
[5] pls_2.6-0           nnet_7.3-12         randomForest_4.6-12 rpart_4.1-10      
zachmayer commented 6 years ago

Doesn't work yet with multiclass, sorry!

Sent from my iPhone

On Aug 19, 2017, at 2:25 PM, mario-metriplica notifications@github.com wrote:

I need to ensemble several models for multiclass problem. So, I'm using caretEnsemblepackage, specific caretStackfunction for stacking models.

Reproducing problem:

set.seed(1) library(caret) library(caretEnsemble) data(iris) weaklearners = caretList( x=iris[,1:2], y=iris[,3], trControl=trainControl(method="cv"), methodList=c("rpart", "pls") )

stronglearner = caretStack(weaklearners, method="rf") Error message:

Error in check_caretList_model_types(list_of_models) : Not yet implemented for multiclass problems Has caretEnsemblepackage implemented ensemble algorithms for multiclass problems?

Session Info:

sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 other attached packages: [1] caretEnsemble_2.0.0 caret_6.0-76 ggplot2_2.2.1 lattice_0.20-34
[5] pls_2.6-0 nnet_7.3-12 randomForest_4.6-12 rpart_4.1-10
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.