title: Cross-validation: extracting the model values out per row?
body: <p>I'm using Leave-One-Out cross-validation for an exercise and was wondering if it was possible to extract the individual test statistics from each validation step. </p>
  
  <p>If my understanding of LOOCV is right, it should be something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/FKKvG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FKKvG.png" alt="enter image description here"></a></p>
  
  <p>I'm interested in what the prediction is for each of the end results. My approach looks like this (using Iris dataset as an example):</p>
  
  <pre><code>attach(iris)
  
  library(caret)
  
  train_iris &lt;- train(
    iris$Petal.Width ~ .
    , method="rf"
    , data=iris
    , trControl = trainControl(method="LOOCV")
  )
  
  print(train_iris)
  </code></pre>
  
  <p>The output gives me <code>0.1784474  0.9448437</code> for the RMSE and the Rsquared respectively. If my understanding is right, these are the aggregated values across the cross-validations. Is there any way to extract what the RMSE and Rsquared is for each cv iteration instead of the summarized training set?</p>