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?
Asked
Active
Viewed 1,068 times
1 Answers
2
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.
gunes
- 57,205
And, there is no other way for ROC curves for example.
– gunes Nov 05 '22 at 15:42