Why is Curve fitting tool not giving good results even with the R-square value of 0.99?
2 views (last 30 days)
Show older comments
I am trying to extract the equation from the matlab example of wind turbine controller design. There is CpData, TSRgrid and Bgrid. But I am unable to get any useful equation from it. At last I used linear curve fitting based on two variables. But results which should be close to 0.48 something are like in -500. It is weird for me. Please do help what I am doing wrong.
1 Comment
John D'Errico
on 28 Sep 2024
The mind reading toolbox is broken again. And lacking that, we cannot see into your computer, cannot read your mind. We cannot even see the data you have a problem with. We cannot see the model you want to fit. We cannot know why you think the fit is poor. And yes, I might hazard a guess, but it will be a completely wild guess that would never be correct.
So if you want help, then you need to make it possible to get help. Best is to provide your data, then the model you are trying to fit. Explain why you think the fit is inadequate.
Answers (2)
Supraja
on 7 Oct 2024
Hello Arsal,
As far as I understand you are not able to get results while using your R sqaure value.
I would recommend adding more information in the question about the exact workflow you are following and the place where you are encouring an error.
However, based on my understanding I belive there is an issue while you are evaluating the goodness of fit.
Here is the MATLAB documentation on 'Evaluating goodness of fit': https://in.mathworks.com/help/curvefit/evaluating-goodness-of-fit.html
I hope this would help resolve your query!
0 Comments
Alex Sha
on 7 Oct 2024
@Muhammad Arsal the goodness of a fitting should be judged by SSE (Sum of Squared Error), but not R-Square value, the former represent "the degree of Sameness", while the later is "the degree of Similarity", like the examles below, all R-Square values are 1.0, but how can we think the fitting are good?
Case-1
x=[1,2,3,4,5,6,7,8,9,10];
y=[6,7,8,9,10,11,12,13,14,15];
Case-2
x=[1,2,3,4,5,6,7,8,9,10];
y=[10,9,8,7,6,5,4,3,2,1];
0 Comments
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!