Model Evaluation: R2 Score is very bad when the range of values is low but Mean absolute error is good I have a dataset where the values of the dependent variable are small, i.e. range is 1.7 to 2.2. I fitted a model and made predictions on y_test, the predictions are good because the MAE is 0.3. All the predictions are almost close to y_test.
When I'm calculating r2_score, the r2 value is -16, as the data points are small and their range is small. The sum of squares of the residual errors is far greater than the total sum of the errors. That is the reason why r2_score is very low. Refer the dataframe below.


Did you see the above pics, the SSres is very huge where as SStot is very small. The difference between true values and predictions is on average 0.3, still why R2 score is so low? How to overcome this problem? Should I ignore this?
 A: (Let me start by saying that a likely answer is that there is a bug in your code.)
Consider what $R^2$ means: it is a comparison of your model to the performance of a model that naïvely guesses the mean every time.
$$
R^2=1-\dfrac{
\sum\big(
y_i-\hat y_i
\big)^2
}{\sum\big(
y_i-\bar y
\big)^2}
$$
If your performance is worse than the baseline model whose predictions are used in the denominator, then you wind up with a value less than zero, indicating that you get stronger performance just by guessing $\bar y$ every time.
If your value is $-16$, this tells me that you’re able to do much better just by guessing $\bar y$ every time.
I can think of a couple of reasons why you might have terrible $R^2$ yet acceptable MAE.

*

*There are a few (maybe just one) terrible predictions that the squaring in $R^2$ penalizes very brutally, but MAE does not punish nearly as severely.


*A baseline model that always guesses $\bar y$ achieves better (lower) MAE than your model, and the fact that you’re working with a small range of numbers tricks you into thinking that the small MAE is acceptable, despite stronger performance by a naïve model. Consider calculating the following quantity and noting if the value is less than zero.
$$
1-\dfrac{
\sum\big\vert
y_i-\hat y_i
\big\vert
}{\sum\big\vert
y_i-\bar y
\big\vert}
$$
