pymc-devs/pymc — pull request #599 by karlnapf (2014-08-29 15:35:43+00:00)
Title: initial working draft of kameleon mcmc

Hi

as discussed a while ago, I wrote a draft for the kernel adaptive metropolis hastings sampler from
http://jmlr.org/proceedings/papers/v32/sejdinovic14.html
based on our codes from
https://github.com/karlnapf/kameleon-mcmc

There are several things that are not as clean as they could
* It would be nice to make this sampler a subclass of a metropolis Hastings one with just the proposal being different (and scaling parameters)
* One problem is that the proposal here is not symmetric, so it needs to be incldued in the MH ratio, see #592
* In particular, the scale tuning code is duplicate, I dont know however whether you want this to allow for different schedules
* The helper class for Gaussian would be better put somewhere else, see #593
* I wrote the kernel function using theano (using its autodiff for the gradient, which keeps to code a bit cleaner), should this go to some helper class? Though the Gaussian kernel is the one for using this in practice
* I have a seperate class on my computer where I plot the proposal in every nth step (if the target is 2d), not sure whether this belongs into pymc though, thoughts?

Finally, no unit tests yet. If this stuff is supposed to go on and we finalised the structure, I am happy to extensively unit test everything, for now I can put an example?

Let me know any comments and I'll update the code.