emcee should be allowed as a method kwarg to Minimizer.minimize

58 views
Skip to first unread message

Faustin Carter

unread,
Oct 14, 2018, 2:17:12 PM10/14/18
to lmfit-py
Before opening an issue, I wanted to float this idea here:

There are several class methods of Minimizer that return a MinimizerResult object, and set the method attribute of that object. Currently, Minimizer.emcee() is the only one that is not accessible by passing the method kwarg to Minimizer.minimize. I realize that the MCMC sampling process is not strictly a minimization routine, but under certain constraints the maximum likelihood estimate should be identical to the output of a least-squares routine that minimizes Chi-square. In other words, it is possible to use emcee to "fit" to the model in addition to just calculating better parameter covariances.

The reason why emcee should be added as a kwarg to Minimizer.minimize (in my opinion) is because when you want to run a fit on a Model object by calling Model.fit, that calls Minimizer.minimize under the hood. There is no way to run an emcee directly on a Model class (since there is no transparent access to the Minimizer class from the Model object) without first running any other fit method and then calling the emcee method of ModelResult object.

Thoughts? If there is agreement on this, I will open an issue and start coding up a fix for PR.

Matthew Newville

unread,
Oct 14, 2018, 6:21:54 PM10/14/18
to lmfit-py
This seems like a fine idea to me.  I'd have no objections.


--
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 post to this group, send email to lmfi...@googlegroups.com.
Visit this group at https://groups.google.com/group/lmfit-py.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/99099b67-4592-4a29-8bdc-827cd64f5ea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages