Description Usage Arguments Details Value See Also
This a Markov chain on (z, β, θ)
1 2 3 4 | lda_fgs_st(K, V, wid, doc.N, h.grid, st.grid, st.grid.nbrs, init.st.grid.index,
init.st.grid.zetas, max.iter, burn.in, spacing, tuning.iter, save.z,
save.beta, save.theta, save.st.grid.index, save.lp, save.hat.ratios,
save.tilde.ratios, verbose, max.iter.final = max.iter)
|
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 |
h.grid |
the grid of hyperparameters h = (η, α), 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 |
st.grid |
the helper grid of hyperparameters h = (η, α), 2 x G' matrix, for Serial Tempering, where G' is the number of grid points and the first row is for α points and the second row is for η points |
st.grid.nbrs |
the neighbor indices, from [0, G'], of each st.grid point |
init.st.grid.index |
the initial h index from st.grid for Serial Tempering |
init.st.grid.zetas |
initial guess for normalization constants |
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) |
tuning.iter |
the number of tuning iterations |
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.st.grid.index |
if 0 the function does not save selected indices of h in the grid |
save.lp |
if 0 the function does not save computed log posterior for iterations |
save.hat.ratios |
if 1 sub grid and main grid ratios are saved |
save.tilde.ratios |
if 1 normalized main grid ratios are saved. It's mainly used for estimating posterior expectations. |
verbose |
values: 1, 0 |
max.iter.final |
the max number of Gibbs iterations to be performed for the final tuning run |
Last modified on: January 28, 2016
the Gibbs sampling output
Other Gibbs sampling methods: get_grid_neighbors
,
lda_acgs_hs
, lda_acgs
,
lda_fgs_hs
, lda_fgs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.