Learn R Programming

celda (version 0.0.0.9000)

calculatePerplexity: Calculate the perplexity from a single celda chain

Description

Perplexity is defined as the inverse of the geometric mean of the log-likelihoods over all iterations of Gibbs sampling.

Usage

calculatePerplexity(completeLogLik, log = FALSE)

Arguments

completeLogLik

The complete Gibbs sampling history of log-likelihoods for a single celda chain

log

Set log to TRUE to visualize the log(perplexity) of Celda_CG objects.

Value

The perplexity for the provided chain as an mpfr number

Details

Perplexity is defined in LDA as the exp of the log likelihood of the model divided by the total amount of word tokens. The corresponding perplexity for the celda models are derived in their respective model description documents. These documents will not be made publicly available until after publication of celda.