R caretEnsemble building models on different feature subsets
<p>I wonder if there is some way to combine prediction of two different models are built on two different input feature set . For example , first on features 1:10 and second on 11:20 and combine with caretEnssemble of caretStack function.</p>

<p>I am trying :</p>

<pre><code> data("mtcars")

head(mtcars)

library(caret)
library(caretEnsemble)
library(glmnet)
library(gbm)

ma_control &lt;- trainControl(method          = "cv",
                           number          = 2,
                           summaryFunction = RMSE,
                           verboseIter     = TRUE,
                           savePredictions = TRUE)

subset1                 &lt;- mtcars[,c(2:3,1)]
subset2                 &lt;- mtcars[,c(4:5,1)]

classification_formula1 &lt;- as.formula(paste("mpg" ,"~",
                                            paste(names(subset1)[!names(subset1)=='mpg'],collapse="+")))
classification_formula2 &lt;- as.formula(paste("mpg" ,"~",
                                            paste(names(subset2)[!names(subset2)=='mpg'],collapse="+")))

emf_tuneGrid_list &lt;- NULL;
emf_tuneGrid_list$glmnet1_tuneGrid &lt;- expand.grid(alpha = 1.0 ,lambda = 1)
emf_tuneGrid_list$gbm2_tuneGrid    &lt;- expand.grid(interaction.depth = 1, n.trees = 101 ,
                                                    shrinkage = 0.5 , n.minobsinnode = 5)

emf_model_list &lt;- caretList (
  trControl=ma_control, metric = "RMSE",
  tuneList=list(
    glmnet1= caretModelSpec(method='glmnet',  classification_formula = classification_formula1 , data = subset1 , tuneGrid=emf_tuneGrid_list$glmnet1_tuneGrid),
    gbm2   = caretModelSpec(method='gbm',     classification_formula = classification_formula2,  data = subset2 , tuneGrid=emf_tuneGrid_list$gbm2_tuneGrid , verbose = FALSE)
  )
)
</code></pre>

<p>But get  Error in extractCaretTarget.default(...) : 
  argument "y" is missing, with no default</p>