lda_vem: LDA: Variational EM

Description Usage Arguments Details Value Note

View source: R/RcppExports.R

Description

This implements the variational inference algorithm for the LDA (full Bayesian) model. This includes optimization routines for both α and η hyperparameters.

Usage

1
2
3
lda_vem(num_topics, vocab_size, docs_tf, alpha_h, eta_h, vi_max_iter,
  em_max_iter, vi_conv_thresh, em_conv_thresh, estimate_alpha, estimate_eta,
  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

vi_max_iter

Maximum number of iterations for variational inference

em_max_iter

Maximum number of iterations for variational EM

estimate_alpha

If true, run hyperparameter α optimization

estimate_eta

If true, run hyperparameter η optimization

verbose

from 0, 1, 2

vi_conv_threshold

Convergence threshold for the document variational inference loop

em_conv_threshold

Convergence threshold for the variational EM loop

Details

References: * Latent Dirichlet Allocation. D. Blei, A. Ng, M.I. Jordan (2003)

Value

TBA

Note

Created on April 26, 2016


clintpgeorge/ldavem documentation built on May 13, 2019, 8:01 p.m.