1
$\begingroup$

In leave-one-out cross validation, at each iteration, my test set is composed by only one data point - precisely the "left out", to be compared with the predicted one, using the estimated coefficients from the train set. Normally, for the train set, one would compute the $R^2$ over several observations and fitted values. For the test set, how should one compute the $R^2$ between a pair of numbers, namely one observed and another predicted value? Is there a common convention on how to tackle this?

$\endgroup$
1
$\begingroup$

Gather all your predictions for the entire set (since each prediction is generated via CV, it's unbiased), and calculate the $R^2$ on all true vs prediction.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ I see, that solves. I guess I could bootstrap on this to estimate the uncertainties for this R2, right? $\endgroup$ – ouranos Apr 28 at 9:00
  • $\begingroup$ Yes, you can do it. $\endgroup$ – gunes Apr 28 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.