Running minimize() with verbosity

8 views
Skip to first unread message

Jonno Hedger

unread,
May 26, 2022, 5:35:56 AM5/26/22
to lmfit-py
Hi,

I've been runninga multi dataset fit by following very closely to this example (https://lmfit.github.io/lmfit-py/examples/example_fit_multi_datasets.html

My code is structured exactly the same and called in the same manner, and it is working well. 

What I have not been able to manage is getting minimize() to print out updates during the fit. I would like to be able to run minimize() with some verbosity. Is this possible? 

Thanks for the help,

Jonathan

Renee Otten

unread,
May 26, 2022, 6:59:49 AM5/26/22
to lmfi...@googlegroups.com
Hi Jonathan, 


If the SciPy optimizer you’re using has the option to be verbose you can certainly activate that, just pass the correct variable to the underlying minimizer using the “fit_kws” argument to the “minimize” function (https://lmfit.github.io/lmfit-py/fitting.html#the-minimize-function).

Otherwise you can print output during the fit using the “iter_cb” variable - see, for example, https://lmfit.github.io/lmfit-py/examples/documentation/model_with_iter_callback.html

Hope that helps, 
Renee


--
You received this message because you are subscribed to the Google Groups "lmfit-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmfit-py+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/5ed0f069-3031-4dc8-92c8-3c7420810d42n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages