title: Error with Ensemble models and tuning in R
body: <p>I've been trying to use an Ensemble method in R and was trying out the ensembles of caret models on the <i>BostonHousing2</i> dataset. While setting up the greedy ensemble as well as the linear ensemble, I get an error. The code is as follows:</p>
  
  <pre><code>library(caret)
  library(caretEnsemble)
  library(mlbench)
  data(BostonHousing2)
  X &lt;- model.matrix(cmedv~crim+zn+indus+chas+nox+rm+age+dis+
                  rad+tax+ptratio+b+lstat+lat+lon, BostonHousing2)[,-1]
  X &lt;- data.frame(X)
  Y &lt;- BostonHousing2$cmedv
  train &lt;- runif(nrow(X)) &lt;= 0.7
  folds=5
  repeats=1
  myControl &lt;- trainControl(method='cv', number=folds, repeats=repeats, returnResamp='none', 
                        returnData=FALSE, savePredictions=TRUE, 
                        verboseIter=TRUE, allowParallel=TRUE,
                        index=createMultiFolds(Y[train], k=folds, times=repeats))
  PP &lt;- c('center', 'scale')
  model1 &lt;- train(X[train,], Y[train], method='gbm', trControl=myControl,
              tuneGrid=expand.grid(.n.trees=500, .interaction.depth=15, .shrinkage = 0.01))
  model2 &lt;- train(X[train,], Y[train], method='blackboost', trControl=myControl)
  model3 &lt;- train(X[train,], Y[train], method='parRF', trControl=myControl)
  model4 &lt;- train(X[train,], Y[train], method='mlpWeightDecay', trControl=myControl, trace=FALSE, preProcess=PP)
  model5 &lt;- train(X[train,], Y[train], method='ppr', trControl=myControl, preProcess=PP)
  model6 &lt;- train(X[train,], Y[train], method='earth', trControl=myControl, preProcess=PP)
  model7 &lt;- train(X[train,], Y[train], method='glm', trControl=myControl, preProcess=PP)
  model8 &lt;- train(X[train,], Y[train], method='svmRadial', trControl=myControl, preProcess=PP)
  model9 &lt;- train(X[train,], Y[train], method='gam', trControl=myControl, preProcess=PP)
  model10 &lt;- train(X[train,], Y[train], method='glmnet', trControl=myControl, preProcess=PP)
  all.models &lt;- list(model1, model2, model3, model4, model5, model6, model7, model8, model9, model10)
  names(all.models) &lt;- sapply(all.models, function(x) x$method)
  sort(sapply(all.models, function(x) min(x$results$RMSE)))
  greedy &lt;- caretEnsemble(all.models, iter=1000L)
  Error: is(list_of_models, "caretList") is not TRUE
  </code></pre>
  
  <p>There are a couple of instances where I am stuck: while setting up model1, I get the following error message:</p>
  
  <pre><code>The tuning parameter grid should have columns n.trees, interaction.depth, shrinkage, n.minobsinnode
  </code></pre>
  
  <p>Also while setting up the greedy ensemble as well as the linear ensemble, I get a list error when combining the models. Request some assistance please.</p>
  
  <p>PS: Apologize, if these needed to be separate questions.</p>