1

https://gist.github.com/zachmayer/5152157から zachmayer のコードを試してみましたが、caretEnsemble コマンドを実行すると、「is(all.models, "caretList") is not TRUE」というエラーが発生しました。すべてのモデルのリストを作成するだけでなく、caretList を使用する必要がありますか? ありがとう。

`#Train some models  
model1 <- train(X[train,], Y[train], method='gbm', trControl=myControl,
            tuneGrid=expand.grid(.n.trees=500, .interaction.depth=15,.shrinkage = 0.01))
model2 <- train(X[train,], Y[train], method='blackboost', trControl=myControl)
...
#Make a list of all the models  
all.models <- list(model1, model2, model3, model4, model5, model6, model7, model8, model9, model10)

#Make a greedy ensemble
 greedy <- caretEnsemble(all.models, iter=1000L)
Error: is(all.models, "caretList") is not TRUE`
4

1 に答える 1

1

一般的な機能を使用できますc()

参考までに:https ://rdrr.io/cran/caretEnsemble/man/c.caretList.html

PS また、fitControl()設定する必要がありますsavePredictions = TRUE

于 2016-10-04T18:38:28.000 に答える