How is R-square calculated in curve fitting tool for LAR and bisqaure robust fit option?
조회 수: 4 (최근 30일)
이전 댓글 표시
I find that for a polynomial fit with Bisquare or LAR robust fit option, the r-square value I calculate doesn't match with the curve fitting tool result. does the curve fitting tool use a different formulation than the one explained in here?
please help.
댓글 수: 2
Rik
2019년 12월 20일
Try to make a MWE so we can run your code without any other dependencies and can reproduce your issue. That would help to determine if there is a float rounding error, a bug in your code, or a bug in Matlab.
답변 (1개)
ME
2019년 12월 20일
Does this link help at all?
It looks like LAR doesn't so much minimise an R^2 value but rather minimises the absolute differences. Could that be your issue and why they don't match?
댓글 수: 1
Junxi Zhang
2020년 2월 3일
LAR minimize the absolute differences, so the fitted model using LAR has different coefficients. That's easy to understand.
However, if we use function "fit" with LAR in command line as well as app "curve fitting tool", the coefficients are the same but the goodness of fit is different. That is to say, SSE, R-sqaure and RMSE are much better in app "curve fitting tool" than in function "fit", which is the same as values calculated manually.
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!