pastas.solver.least_squares.Lmfit#

class pastas.solver.least_squares.Lmfit(name: str = 'solver', method: Literal['leastsq'] = 'leastsq', pcov: pandas.DataFrame | None = None, **kwargs)#

Solving the model using the LmFit [Newville et al., 2019].

This is basically a wrapper around the SciPy Levenberg Marquardt solver (“leastsq”). Lmfit adds some functionality for gracefully handling boundary conditions.

Notes

lmfit/lmfit-py

Methods#

solve(→ tuple[bool, pandas.DataFrame])

Call lmfit.Minimizer.minimize to solve the model.

objfunction(→ pastas.typing.ArrayLike)

Objective function that is minimized by the Lmfit solver.

fit_report(→ str)

Report on the fit after a model is optimized.

to_dict(→ dict)

Return a dictionary representation of the Lmfit object.