This patch makes a number of improvements to gnuplot
fitting.
Unzip, untar to find
newfit.patch containing the patch
INSTALL.newfit containing instructions for applying it.
Changes are to src/fit.c, demo/fit.dem,
and new directory demo/newfit with many demos
of the need for the changes and their effect.
See demo/newfit/README.newfit for details
Summary:
1. Error message for undefined function evaluation
2. Check for error value equal to zero
3. Made new message when fit stops because lambda is
too large
4. Zero-change in chisquare is now "BETTER" rather
than "WORSE"
5. Final parameter cleanup fixes
6. Changed convergence criterion,
with new user-variable FIT_LIMIT_ABS.
7. New one-line progress-report,
revert by FIT_CLASSIC_PROGRESS = 1
8. New final fit parameter report format,
revert by FIT_CLASSIC_RESULT = 1
9. Error-rescaling control
10. Gnuplot-readable parameters and errors in one line
in fit.log file
11. Derivative-step algorithm improvement,
revert by FIT_CLASSIC_DRV_STEP = 1
12. Improved treatment of parameters near zero
13. Parameter step size limit, controlled by
FIT_MAX_PAR_STEP
14. Scale-independence through multiplicative lambda,
revert by FIT_CLASSIC_LAMBDA = 1
15. "Skeptical" chisquare for nonlinear fits,
controlled by FIT_SKEPTICAL
16. Monte Carlo search for initial fit parameters
Thomas Mattison
Physics & Astronomy Department
University of British Columbia
Vancouver BC V6T 1Z1
mattison@physics.ubc.ca
March 7, 2006
Logged In: YES
user_id=1393635
Oops, I forgot to attach the file the first time!
This time, for sure....
zipped tarball containing INSTALL.newfit and newfit.patch
Logged In: YES
user_id=235620
Finally some discussion of this patch on the mailing list
(Lucas Hart, Bastian Maerkisch). Sounds to me that it's not
ready to drop into 4.2 as is, so I'll bump the priority back
down to reflect that.
Handing this off to Bastian Maerkisch.
Update to CVS 2011-01-18 (markisch)
newfit-cvs-20110118.patch is my attempt to update this patch set to current CVS,
I propose the following changes to be committed to CVS right away:
1. Error message for undefined function evaluation
3. Made new message when fit stops because lambda is too large
4. Zero-change in chisquare is now "BETTER" rather than "WORSE"
5. Final parameter cleanup fixes
Personally, I would suggest to include
9. Error-rescaling control
since it fixes bug #2956524, which _really_ annoys me.
The other changes might need some review or cleanup. The "user interface" via variables should probably be changed to "set fit ..." commands. (One might also argue that some functionality is beyond the scope of gnuplot). Also, the defaults should maybe be changed as to preserve current behaviour.
Please let me know what you think and I'll prepare the patches.
Topic 9 (error rescaling control) is addressed by a patch attached to Bug 2956524.
Update this patch to current CVS.
Items 1-7, 9 have finally been included in version 5.0 in revised form and can be controlled via new
set fit
commands.In addition, scale dependence (14) was improved by prescaling the fit parameters by default, see [#507].
The Monte Carlo search for initial fit parameters might be included as a fitting back-end for patch [#665] (update pending) at a later stage.
Related
Patches:
#507Patches: #665