Discussion:
linear fit
Antonio
2012-04-28 10:48:17 UTC
Permalink
Hello everybody,
I checked Veusz linear fit against a certified data set coming from NIST:
Statistical Reference Datasets http://www.itl.nist.gov/div898/strd/ .
In particular, the first one I used was the Norris dataset you could find here:
http://www.itl.nist.gov/div898/strd/lls/data/Norris.shtml .
Maybe I did something weird and stupid but the line fit does not look like the
data plot and coefficients are pretty different from certified ones.

I checked the dataset against gnuplot, gnumeric, extrema, labplot, SSP, PSPP,
... and the fit looks allright with them.

Bye _Antonio
Jeremy Sanders
2012-04-30 19:10:54 UTC
Permalink
Post by Antonio
Hello everybody,
Statistical Reference Datasets http://www.itl.nist.gov/div898/strd/ .
http://www.itl.nist.gov/div898/strd/lls/data/Norris.shtml .
Maybe I did something weird and stupid but the line fit does not look like the
data plot and coefficients are pretty different from certified ones.
I checked the dataset against gnuplot, gnumeric, extrema, labplot, SSP, PSPP,
... and the fit looks allright with them.
Thanks - I didn't get the line to fit initially, but that appears to be
because it doesn't have any uncertainties associated with it. Veusz
assumes 5% errors if there are no uncertainties, which doesn't work in
some cases with the minimisation procedure. Probably because the 5%
errors give lots of weight to the values near zero. I haven't tested
whether pyminuit does a better job (veusz supports this as an optional
fitting module).

If I set the error bars to be constant it works a lot better and gives
values close to those quoted. I should investigate whether there is a
problem with a code or whether veusz should do a better job at guessing
what the uncertainties are. Maybe constant errors are better than
fractional. See attached veusz file.

Veusz needs a better interface for the fitting. I plan to add a proper
fitting dialog box in the future, but there are lots of other things to
do to!

Jeremy
Benjamin K. Stuhl
2012-04-30 20:30:53 UTC
Permalink
Post by Jeremy Sanders
Post by Antonio
Hello everybody,
Statistical Reference Datasets http://www.itl.nist.gov/div898/strd/ .
http://www.itl.nist.gov/div898/strd/lls/data/Norris.shtml .
Maybe I did something weird and stupid but the line fit does not look like the
data plot and coefficients are pretty different from certified ones.
I checked the dataset against gnuplot, gnumeric, extrema, labplot, SSP, PSPP,
... and the fit looks allright with them.
Thanks - I didn't get the line to fit initially, but that appears to be
because it doesn't have any uncertainties associated with it. Veusz
assumes 5% errors if there are no uncertainties, which doesn't work in
some cases with the minimisation procedure. Probably because the 5%
errors give lots of weight to the values near zero. I haven't tested
whether pyminuit does a better job (veusz supports this as an optional
fitting module).
I loaded your test.vsz in a pyminuit build and get similar results to you:
the fit is very strange if I include the points near zero with relative error bars,
but works fine using either the fixed uncertainties data set or if I just exclude the
points with x < 1. So I agree that this is indeed related to the default assumed 5%
uncertainty.

Regards,
-- BKS

Continue reading on narkive:
Loading...