LsqFit.jl icon indicating copy to clipboard operation
LsqFit.jl copied to clipboard

`lmfit` ignores `wt` parameter

Open jw3126 opened this issue 6 years ago • 5 comments

The lmfit function does not propagate the wt parameter to levenberg_marquardt. https://github.com/JuliaNLSolvers/LsqFit.jl/blob/8b163b79f4871cdac416943a17a1508d304ffdf4/src/curve_fit.jl#L64-L68

jw3126 avatar Oct 15 '19 09:10 jw3126

Also the autodiff parameter is not used.

jw3126 avatar Oct 15 '19 09:10 jw3126

The weight parameter is applied in the curve_fit and AFAIK passed through to lmfit to be used in the LsqFitResult. The autodiff parameter could probably be removed as it's unused.

dm3 avatar Nov 27 '19 10:11 dm3

Yep, this isn't really an issue, more of a "coding style" concern

Magalame avatar Nov 30 '19 05:11 Magalame

I agree the autodiff should be removed. lmfit is really superfluous as well to be honest, but... I'm going to be using another LM implementation in the near future, so we'll just remove lmfit then.

pkofod avatar Jan 02 '20 13:01 pkofod

I agree, but now I think it should just accept all the options as some kind of options type and kill all kwargs... as the often make things hard to debug. autodiff should not be there and neither should the weight.

pkofod avatar Sep 03 '22 20:09 pkofod