Can pymc3 determine a global optimum in a multimodal posterior distribution? if so, how would this work?
I doubt there is any algorithm or inference method can guarantee give you a global optimum except in simple low dimension problems.
What you can try as a close approximate maybe: sample from the posterior, compute the logp, and do a small grid search around the region of the maximum of the logp
PyMC3 makes a call to SciPy’s minimize
under the hood. By passing args to find_MAP
, you ought to be able to call a custom minimization algorithm. The SciPy docs say:
It may be useful to pass a custom minimization method, for example when using a frontend to this method such as scipy.optimize.basinhopping or a different library. You can simply pass a callable as the method parameter.
Something like basinhopping may do better at searching for a global minimum.
The PyMC3 call to minimize
is here.