I'm trying to find a definitive way to conclude the R^2 score from a prediction accuracy point of view rather than variance. How should I do it?
Conceptually, most blogs / articles explain R^2 as:
- The variation in the data points that can be explained by the model.
- A measure of how closely fitted the data points are to the regression line.
I find these answers to be unsatisfactory.
If the R^2 score is 0.7, is it right for me to say that 70% of the data has been predicted accurately by the model? Since most explanations are tied to the explanation of the variance I'm thinking that looking at it from an 'accuracy' stand point of view is wrong. It implies that if I predicted 10 random points on the x-axis I would accurately guess 7 of its actual values.
According to scikit-learn's documentation page at the 'score' section:
The coefficient R^2 is defined as (1 - u/v), where u is the residual sum of squares ((y_true - y_pred) ** 2).sum() and v is the total sum of squares ((y_true - y_true.mean()) ** 2).sum()
Apart from scikit-learn's way of calculation, another way of calculation is simply the squared of R (coefficient of correlation).
Which way is right? Are both the same? Or are they related in some way?
Assuming the right way of calculation is based off scikit-learn's documentation where the R^2 score is the variance from the predicted mean divided by the variance from the actual mean, is it even possible that the variance from the predicted mean is smaller than the variance from the actual mean?
How can the variance from the prediction model which is built upon another dataset (let's say dataset A) be smaller than the actual variance of dataset B?
Deeply appreciate any thoughts, comments or clarification.