lmfit / lmfit-py

Non-Linear Least Squares Minimization, with flexible Parameter settings, based on scipy.optimize, and with many additional classes and methods for curve fitting.
https://lmfit.github.io/lmfit-py/
Other
1.08k stars 277 forks source link

optimize with bounded parameters while fit_kws values specified in the external parameter space. #618

Closed r-xue closed 4 years ago

r-xue commented 4 years ago

Description

If one sets initial_simplex for the minimizer method='nelder', the value will be handed over to scipy.optimize, without any transformation, unlike a bounded parameter value. This poses a confusing condition for the underline algorithm when min/max are set in Parameters.

In this specific case, It might be good just ignoring the parameter bounds in lmfit (since it's already implicitly defined by initial_simplex), or let lmfit also transform initial_simplex into the internal parameter space?

I have to say this is more like a user problem, but it takes me a while to catch this issue.

newville commented 4 years ago

@r-xue re-read the instructions.