1

I'd like to perform inference on a simple Ising model with pymc3:

mu = pm.Uniform('mu', lower=0, upper=1, shape=(N,1))
energy = mu.T * W * mu + f.T * mu
logp = pm.Potential('logp', energy)
start = model.test_point
step = pm.NUTS(vars=[mu])
print 'creating NUTS took', time.time() - t0

However, the last pm.NUTS step takes 2 minutes on average to complete, and uses ~1 gigabyte of memory as well. This is for N=15, so a pretty small model. Any tips on speeding this up? It's already using very basic operations for which the second-order info should be easy to compute.

4

0 回答 0