Scipy's Optimize Curve Fit Limits

后端 未结 4 1267
无人及你
无人及你 2021-01-06 04:07

Is there any way I can provide limits for the Scipy\'s Optimize Curve Fit?

My example:

    def optimized_formula(x, m_1, m_2, y_1, y_2, ratio_2):
            


        
4条回答
  •  孤街浪徒
    2021-01-06 04:44

    Try the lmfit module (http://lmfit.github.io/lmfit-py/). It adds a way to fix or set bounds on parameters for many of the optimization routines in scipy.optimize, including least-squares, and provides many tools to make fitting easier.

提交回复
热议问题