rmcgibbo / pyhmc

Hamiltonain Monte Carlo in Python
https://pythonhosted.org/pyhmc
Other
37 stars 17 forks source link

bad interface #8

Open zhou13 opened 8 years ago

zhou13 commented 8 years ago

I found that this package is significant slower than the hmc in matlab. The reason is that the interface combines the function and its derivative together, i.e., the function needs to return both loglikelihood and its derivative. But in fact, hmc only need to evaluate the loglikelihood twice during its sampling.

zhou13 commented 8 years ago

In addition, I prefer to use energy rather than loglikelihood because the sum of exp of negative energy does not need to be one.

rmcgibbo commented 8 years ago

Cool. If you want to improve it, I'd be happy to merge a PR. I have other priorities right now, so I probably won't be working much on it myself.