Pass custom gradient function to L-BFGS-B local solver of ampgo.

27 views
Skip to first unread message

이준호(일반대학원 화학과)

unread,
Jul 13, 2022, 1:17:44 PM7/13/22
to lmfit-py

Hi LMFIT, I admire your good functionality.
Recently, I need to pass analytic gradient function to ampgo's local solver L-BFGS-B to speed up fitting process.

When I tried such code

opt = minimize(residual, fit_params, method='ampgo', calc_covar=False,
args=(t, prefix, num_comp, base, irf), kws={'data': data, 'eps': eps},
local_opts={'jac': grad_res_gau})

It returns TypeError: _minimize_lbfgsb() got multiple values for argument 'jac'.

Could you suggest how to pass my analytic gradient function to ampgo's local L-BFGS-B solver?

Thanks,
Junho

이준호(일반대학원 화학과)

unread,
Jul 14, 2022, 5:10:26 AM7/14/22
to lmfit-py
Currently, I use ampgo module written by Daniel Schmitz (https://github.com/pistack/ampgo/blob/master/ampgo/_ampgo.py), which supports passing custom analytic gradient function to local solver. However I am very big fan of lmfit library, I still want to know how to pass hand written gradient function to local solver of lmfit's ampgo routine.

Thank you for your great effort.
Junho


2022년 7월 14일 목요일 오전 2시 17분 44초 UTC+9에 이준호(일반대학원 화학과)님이 작성:
Reply all
Reply to author
Forward
0 new messages