Effacer les filtres
Effacer les filtres

Best Descriptor for goodness of fit

1 vue (au cours des 30 derniers jours)
Hannes Frey
Hannes Frey le 24 Août 2021
Commenté : Hannes Frey le 24 Août 2021
Dear all
I am trying to fit experimental data to a linear model of the form of y =B*x using fitlm. I have multiple datasets in x but only one dataset y and i am trying to figure out wich dataset x archives the best linear fit with y obliging the formular y=x*B.
I wonder now what is the best statistical measure to determine which dataset x fits the best (x and y are 1D arrays with roughly 1000 rows)
Can i use the coeficient standart deviation to do that? I am not great in statistics unfortunaltey.
Thank you for you help.

Réponse acceptée

Bjorn Gustavsson
Bjorn Gustavsson le 24 Août 2021
The best descriptor for goodness of fit is some measure of the divergence between the distribution of residuals of your fit and the distribution of residuals you expect knowing "the statistical characteristics of your measurements". If you for example have normal-distributed measurements with variance 1, you should have residuals with a standard-deviation of 1. This is a necessary condition for a good fit, but since a set of alternating residuals of +1 and -1 will give you a standard deviation of 1 too, it is not a sufficient condition. If you instead look at the distribution of the residuals (histogram or something similar) it should be consistent with comming from a normal-distribution. That was a very birds-eye view of this.
My practical advice is to save away the residuals and then calculate the histograms of their distribution and pick the narrowest one with a "nice shape"...
  1 commentaire
Hannes Frey
Hannes Frey le 24 Août 2021
Thank you=) that is a very helpfull answer

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by