PlotLDAModelsPerplexity: Plot LDA Models Perplexity

Description Usage Arguments Value

View source: R/topic_modelling.R

Description

This will calculate the perplexity of the model against itself (TODO: Add a holdout option) for every model in the list, and plot as a line plot. The perplexity serves to give a single digit value per model (each with a different k, or alpha) representing how well the generative model can generate the documents. Lower value is better. In topicmodels journal, this is used to select the k-value, when it reaches the lowest. A continuously decreasing curve may suggest the existence of too many topics in the data, perhaps requiring it to be sliced in a smaller subset before creating the LDA model (I guess).

Usage

1
PlotLDAModelsPerplexity(lda.model.list)

Arguments

lda.model.list

A list of topic models. See CalculateLDAModelsUpToN.

Value

A perplexity plot.


sailuh/topicflowr documentation built on May 27, 2019, 8:46 a.m.