Description Usage Arguments Value See Also
This a Markov chain on (z, β, θ) extending the Collapsed Gibbs Sampler of Griffiths and Steyvers (2004)
1 2 | lda_acgs_hs(K, V, wid, doc.N, alpha, eta, h.grid, max.iter, burn.in, spacing,
save.z, save.beta, save.theta, save.Bh, save.lp)
|
K |
the number of topics in the corpus |
V |
the vocabulary size |
wid |
the vocabulary ids of every word instance in each corpus document (1 X total.N vector). We assume vocabulary id starts with 1 |
doc.N |
the document lengths |
alpha |
the hyper parameter for θ |
eta |
the β matrix smoothing parameter |
h.grid |
the grid of hyperparamets (η, α), 2 x G matrix, where G is the number of grid points and the first row is for α points and the second row is for η points |
max.iter |
the max number of Gibbs iterations to be performed |
burn.in |
the burn in period of the Gibbs sampler |
spacing |
the spacing between the stored samples (to reduce correlation) |
save.z |
if 0 the function does not save z samples |
save.beta |
if 0 the function does not save β samples |
save.theta |
if 0 the function does not save θ samples |
save.Bh |
if 0 the function does not save computed B(h, h_*) values for iterations |
save.lp |
if 0 the function does not save computed log posterior for iterations |
the Gibbs sampling output
Other Gibbs sampling methods: get_grid_neighbors
,
lda_acgs
, lda_fgs_hs
,
lda_fgs_st
, lda_fgs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.