I have implemented the LDA model with rjags. And I successfully got the final samples with:
jags <- jags.model('../lda_jags.bug',
data = data,
n.chains = 1,
n.adapt = 100)
update(jags, 2000)
samples <- jags.samples(jags,
c('theta', 'phi', 'z'),
1000)
Now I can use samples$theta
or samples$phi
to get the result of theta
and phi
. But how can I know how long did it take to sample? Thanks!