简体   繁体   English

负 r 平方用于线性回归,但正 r 平方与随机森林回归

[英]Negative r squared for linear regression but positive r squared with Random forest regressor

My R squared score for Linear regression is -1.56 but my R squared score for Random Forest regressor is around 0.48.我的线性回归的 R 平方分数是 -1.56,但我的随机森林回归量的 R 平方分数约为 0.48。 Is it okay to get scores like this?能拿到这样的分数吗?

Is it okay to get scores like this?能拿到这样的分数吗?

Yes.是的。

Explanation - Linear Regression and Random Forest are two very different models.解释- 线性回归和随机森林是两个非常不同的模型。 It is highly possible that the data on which you are trying to fit the model is so complicated that linear regression does not fit it well.您尝试拟合 model 的数据很可能非常复杂,以至于线性回归不能很好地拟合它。

Regarding the negative R squared score - It simply means that the linear regression model fits worse than a horizontal line.关于负的 R 平方分数- 这仅仅意味着线性回归 model 拟合比水平线差。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM