am trying to implement LDA algorithm and I have some problems with tracing from CompletedDirichlet distribution .
I am using the following code
import numpy as np import pymc as pm K = 2 # number of topics beta = np.ones(K) phi = pm.Container([pm.CompletedDirichlet("phi_%s" % k, pm.Dirichlet("pphi_%s" % k, theta=beta)) for k in range(K)]) model = pm.Model([phi]) mcmc = pm.MCMC(model) mcmc.sample(100)
My problem is that when I do
mcmc.trace('phi_0')[:] i get the same values for each sample
completederichlet: how can I make MCMC to give me different samples?