lda_fgs_ppc: LDA: Full Gibbs Sampler with Posterior Predictive Value

Description Usage Arguments Value See Also

View source: R/RcppExports.R

Description

Implements the Full Gibbs sampler for the LDA model—a Markov chain on (β, θ, z). The log posterior predictive value is based on Zhe Chen (2015)

Usage

1
2
lda_fgs_ppc(num_topics, vocab_size, docs_tf, alpha_h, eta_h, max_iter, burn_in,
  spacing, verbose)

Arguments

num_topics

Number of topics in the corpus

vocab_size

Vocabulary size

docs_tf

A list of corpus documents read from the Blei corpus using read_docs (term indices starts with 0)

alpha_h

Hyperparameter for θ sampling

eta_h

Smoothing parameter for the β matrix

max_iter

Maximum number of Gibbs iterations to be performed

burn_in

Burn-in-period for the Gibbs sampler

spacing

Spacing between the stored samples (to reduce correlation)

verbose

from 0, 1, 2

Value

The Markov chain output as a list of

lppv

log posterior predictive values of each document

lppc

averge of log posterior predictive values

See Also

Other MCMC: lda_acgs_st, lda_cgs_em_perplexity, lda_cgs_em, lda_cgs_perplexity, lda_fgs_BF_perplexity, lda_fgs_perplexity, lda_fgs_st_perplexity


clintpgeorge/ldamcmc documentation built on Feb. 22, 2020, 12:39 p.m.