lda_smoothed: Run LDA adapted to use a count matrix

Description Usage Arguments

View source: R/LDA_smoothed.R

Description

Run LDA adapted to use a count matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
lda_smoothed(
  N,
  K,
  max_iter = 50,
  thresh = 1e-04,
  seed = NULL,
  cores = NULL,
  alpha = NULL,
  eta = NULL,
  NMF = FALSE
)

Arguments

N

matrix of word counts

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

eta

the exchangeable Dirichlet parameter for beta, if NULL a default value of 1/K is used

NMF

logical indicating if lambda should be initialised using non-negative matrix factorisation, if FALSE it is generated using K random documents


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