|
|
Ausgleichsrechnung, r-squared negativ |
|
johntwenty |
Forum-Newbie
|
|
Beiträge: 1
|
|
|
|
Anmeldedatum: 15.10.09
|
|
|
|
Wohnort: ---
|
|
|
|
Version: ---
|
|
|
|
|
|
Verfasst am: 15.10.2009, 12:41
Titel: Ausgleichsrechnung, r-squared negativ
|
|
|
|
|
hello,
I am trying to perform a Gaussian ('gauss2') fit to a set of measurement data consisting of 71 measurements. Unfortunately it does not work yet. I always get this:
General model Gauss2:
f(x) = a1*exp(-((x-b1)/c1)^2) + a2*exp(-((x-b2)/c2)^2)
Coefficients (with 95% confidence bounds):
a1 = 0
b1 = 0.6476
c1 = 0.2089
a2 = -3.424e+128 (-Inf, Inf)
b2 = 0.679 (-2.462e+074, 2.462e+074)
c2 = 0.7093 (-6.117e+072, 6.117e+072)
Goodness of fit:
SSE: 2.644e+005
R-square: -326.7
Adjusted R-square: -340.5
RMSE: 47.34
Warning: A negative R-square is possible if the model
does not contain a constant term and the fit
is poor (worse than just fitting the mean).
Try changing the model or using a different StartPoint.
The results are appended in the graphic. The red curve is the fitted curve (constant at zero and then one peak on the right side of the plot) and the blue curve is the data to be fitted.
Why it can not fit my set of measurement data? What have I to change that it works? Thanks a lot.
Beschreibung: |
|
Download |
Dateiname: |
untitled.jpg |
Dateigröße: |
15.15 KB |
Heruntergeladen: |
1106 mal |
|
|
|
|
|
Harald |
Forum-Meister
|
|
Beiträge: 24.495
|
|
|
|
Anmeldedatum: 26.03.09
|
|
|
|
Wohnort: Nähe München
|
|
|
|
Version: ab 2017b
|
|
|
|
|
|
Verfasst am: 15.10.2009, 14:55
Titel:
|
|
Hi,
The message pretty much explains what the problem is: MATLAB cannot really find parameters to fit the data reasonably well.
Questions / suggestions:
- Why are you using this model? A quadratic model might work better for this case.
- Do you have an idea what the parameters should look like? If so, try using NLINFIT with these starting values, or when working with the Curve Fitting Toolbox, a "general" fit.
- Try adding a constant to the model, as suggested in the error message.
Best,
Harald
|
|
|
|
|
Einstellungen und Berechtigungen
|
|
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
|
|
Impressum
| Nutzungsbedingungen
| Datenschutz
| FAQ
| RSS
Hosted by:
Copyright © 2007 - 2024
goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.
|
|