minpack
minpack copied to clipboard
Curve fitting convenience interface
A typical usage case for non-linear least squares is curve fitting.
In the archived version of @certik, there is already a demo example of a find_fit subprogram: https://github.com/certik/minpack/blob/b46766bd42ec6f08114caf5f6d811d815f78a809/examples/example_primes.f90#L23
Both SciPy and MATLAB provide convenience functions for this purpose:
- SciPy:
scipy.optimize.curve_fit - MATLAB:
lsqcurvefit
These are effectively just wrappers of the general non-linear least squares routines, which take the pair (xdata, ydata) alongside the function to be fitted.
That's right. We need to add it.
I would say add the example, but don't try to provide a curve-fitting api in this library, since a general curve-fitting library should be a separate project. :) There are lot of different curve-fitting methods, and even quite a few fortran projects out there (I maintain several myself).