JuliaNLSolvers / LsqFit.jl

Simple curve fitting in Julia
Other
313 stars 78 forks source link

`lmfit` ignores `wt` parameter #129

Open jw3126 opened 4 years ago

jw3126 commented 4 years ago

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 commented 4 years ago

Also the autodiff parameter is not used.

dm3 commented 4 years ago

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.

Magalame commented 4 years ago

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

pkofod commented 4 years ago

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 commented 2 years ago

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.