levenberg-marquardt
levenberg-marquardt copied to clipboard
Feature request: Returning covariance matrix and parameter error
Thanks for developing a very nice crate! Can a feature be added to return a Covariance matrix of parameters (covar) and 1σ uncertainties on params(perror)? I am working in the scientific field, which requires an error bound to be calculated for the fits, and this feature will help the field so much.
The original MINPACK returns a result of final QR decomposition, which enables the calculation of the covariance matrix. The pwkit(https://github.com/pkgw/pwkit/blob/master/pwkit/lmmin.py) provides perror and covar as a result. The lmfit(https://jugit.fz-juelich.de/mlz/lmfit/-/blob/main/lib/lmfit.hpp) also return the parameters as parerr and covar.