relationship between RMSE and R^2

27 次查看(过去 30 天)
Samuel Fonseca
Samuel Fonseca 2012-4-24
First of all this is more like a theoretical question than a methodological one. I made a script to fit some time series data. I fitted many data series and calculated their goodness of fit statistics. When I analyzed the resulting data I found an inverse relationship between RMSE and R^2.
I´ve look around the web and my statistics books looking for a possible explanation but with no luck.
Is there anyone here who can give me some ideas ?

回答(2 个)

Tom Lane
Tom Lane 2012-4-24
R^2 = 1 - SSE/SST = 1 - DFE*RMSE^2/SST
Here SSE is the error sum of squares, SST is the total sum of squares, and DFE is the degrees of freedom for error. So you would expect R^2 to go down as RMSE goes up. Is that what you meant by an inverse relationship?

Samuel Fonseca
Samuel Fonseca 2012-4-24
Sorry I now realize that my previous post was not clear, what I mean is that I'm getting a relationship inverse from what I expected to get...
Lets say in series 1 i'm geting R^2 =0.8 and RMSE= 1.5 while in series 2 I get R^2= 0.65 and RMSE=0.75
After looking at data in some more detail I found that point 2 has a biger range (max(x)-min(x)) so having a biger range and maybe standar deviation could be related?
  2 个评论
Tom Lane
Tom Lane 2012-4-25
R^2 is sensitive to the x range. That's what some people dislike about it. RMSE should not be sensitive if the model is correct. However, usually a bigger range leads to large R^2 and no change in RMSE. You seem to be saying R^2 is smaller and RMSE is smaller. That is unexpected.
Samuel Fonseca
Samuel Fonseca 2012-5-6
yup that's my point... R^2 values are telling me that fit works good (R^2=0.8) but RMSE id big and then for other series I get the opposite result... unexpectedin deed.. i'll get back and re-check code but i'm pretty sure i'm just using RMSE and R^2 values generated by the fit statistics

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by