lda_original: Run LDA as in the Blei 2003 paper

Description Usage Arguments Value Functions

View source: R/LDA_original.R

Description

Run LDA as in the Blei 2003 paper

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
lda_original(docs, K, max_iter = 50, thresh = 1e-04, seed = NULL)

lda_original_par(
  docs,
  K,
  max_iter = 50,
  thresh = 1e-04,
  seed = NULL,
  cores = NULL
)

lda_noalpha(
  docs,
  K,
  max_iter = 50,
  thresh = 1e-04,
  seed = NULL,
  cores = NULL,
  alpha = NULL
)

Arguments

docs

a list containing all the documents, with the vocabulary encoded e.g. docs[[1]] = c(1, 5, 2) would represent the word indices from a pre-defined vocabulary

K

the number of topics to look for

max_iter

the maximum number of EM iterations to run

thresh

threshold for L convergence, (L_i - L_i-1)/L_i < thresh

seed

set a seed for the random documents to initialise beta

cores

number of cores to run the E-step in parallel, if NULL all detected cores are used

alpha

if you want to set the exchangeable Dirichlet parameter for theta, if NULL a default value of 1/K is used

Value

A list of all parameters

Functions


g-l-mansell/MSLDA documentation built on Dec. 20, 2021, 9:43 a.m.