Learn R Programming

PivotalR (version 0.1.18.5)

perplexity.lda: Perplexity of LDA predictions

Description

Perplexity is a measurement of how well a probability distribution or probability model predicts a sample. This functions computes the perplexity of the prediction by linlk{predict.madlib.lda}

Usage

# S3 method for lda.madlib
perplexity(object, predict_output_table, ...)

Arguments

object

The result of madlib.lda.

predict_output_table

The result of predict on the madlib.lda object.

Arguments passed to or from other methods, not implemented yet.

Value

A numeric value that indicates the perplexity of the LDA prediction.

See Also

madlib.lda builds a topic model using a set of documents.

Examples

Run this code
# NOT RUN {
## Please see the examples in madlib.lda doc.
# }

Run the code above in your browser using DataLab