calculate metrics to find the best number of topics

lda.rep(dtm, max.k = 5, method = "VEM", SEED = 1234)

Arguments

dtm

Object of class "DocumentTermMatrix"

max.k

max number of k

method

The method to be used for fitting; currently method = "VEM" or method= "Gibbs" are supported.

SEED

seed

Value

list of 4 metrics: perplexity, loglikelihood, alpha, entropy, cosine similarity

Examples

if (FALSE) { ldas <- lda.rep(dtm=dtm, max.k=10, method='VEM', SEED=123) plotindex(ldas) }