Why does my R-square value 1 on Regression Learner App?
2 次查看(过去 30 天)
显示 更早的评论
My predicted values are not perfect, but R-square value is 1. Why? Thank you...
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/304503/image.png)
0 个评论
回答(1 个)
Raunak Gupta
2020-5-31
编辑:Raunak Gupta
2020-5-31
Hi,
After understanding the response plot, I can say that the RMSE(root mean squared error) in the calculation is two order of magnitude i.e. more than 100 times smaller than the actual regression values. According to the documentation of Coefficient of Determination, the value is calculated as
errorRatio = (sum of squared error for all data points /sum of square of actual regression value);
rSquareValue = 1 - errorRatio;
So, the above errorRatio is less than 0.005 as per calculated by model thus making the R-squared value 1.00 due to only viewing in 2 decimal places. Though the model will not perfectly calculated regression output but the R-squared value is close to 1 because of very small sum of square of error.
Hope this clarifies the doubt.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!