0
$\begingroup$

I have a problem understanding the residual plot from yellowbrick. I have created the following plots: enter image description here

enter image description here

If I take a look at the first one: It shows the predicted value on the $y$-axis and the real value on the $x$-axis. That means in this case, that some of my predicted values are too low, correct?

If I now take a look at the residual plot: As far as I know the residuals value is calculated with: $\text{residual} = y_\text{real} - y_\text{predicted}$

This would mean that a negative residual value would express that some of my predicted values are too high, correct?

How can this correlate? This seems to be the inversed message compared to the first plot? What is wrong in this case? Do I have to invert the residuals calculation?

Thank you in advance Lukas

$\endgroup$
10
  • $\begingroup$ You have it backwards: the residual is obtained by subtracting the "real" value from the prediction. The two plots clearly show this. $\endgroup$
    – whuber
    Feb 1, 2021 at 16:36
  • 3
    $\begingroup$ What is "yellowbrick" & what does it have to do with your question? $\endgroup$ Feb 1, 2021 at 16:42
  • $\begingroup$ With regard to the first plot the plot shows that you have too low predicted values in some cases and too high predicted values in others. $\endgroup$ Feb 1, 2021 at 19:06
  • $\begingroup$ @whuber, our excerpt & wiki for the residuals tag discuss $y-\hat y$. The discussion on the wikipedia page here implies the same thing. $\endgroup$ Feb 1, 2021 at 22:07
  • $\begingroup$ @gung You're right--sorry. $\endgroup$
    – whuber
    Feb 1, 2021 at 22:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.