title: Statistics of prediction for multiple models with caret
body: <p>I am trying to get statistics of prediction for various training models with the package <a href="http://caret.r-forge.r-project.org/" rel="nofollow">caret</a>. Below is an example that illustrates my need:</p>
  
  <pre><code>library(caret)
  
  # Training:
  # ... Get X and Y for training a binary classification problem. 
  # ... X is input (2000, 5) Y is output (2000,1) ... 
  
  tmp &lt;- createDataPartition(Y, p = 3/4, times = 3, list = TRUE, groups = min(5, length(Y)))
  
  myCtrl &lt;- trainControl(method = "boot", index = tmp, timingSamps = 2, classProbs = TRUE, summaryFunction = twoClassSummary)
  
  RFmodel &lt;- train(X,Y,method='rf',trControl=myCtrl,tuneLength=1, metric="ROC")
  SVMmodel &lt;- train(X,Y,method='svmRadial',trControl=myCtrl,tuneLength=3, metric="ROC")
  KNNmodel &lt;- train(X,Y,method='knn',trControl=myCtrl,tuneLength=10, metric="ROC")
  NNmodel &lt;- train(X,Y,method='nnet',trControl=myCtrl,tuneLength=3, trace = FALSE, metric="ROC")
  
  # resamps reports ROC, Sens, Spec for all models
  resamps &lt;- resamples(list(RF = RFmodel, KNN = KNNmodel, NN = NNmodel, SVM = SVMmodel))
  
  # Prediction:
  # ... Collect X_pred (7000, 5) and Y_pred  (7000,1) ... 
  testPred &lt;- predict(list(RF = RFmodel, KNN = KNNmodel, NN = NNmodel, SVM = SVMmodel), Xtst, type="prob")
  </code></pre>
  
  <p>How can I get the statistics of prediction (ROC, etc.) from  X_kand Y_<code>pred</code> for my 4 models?</p>