get_diagnostics: Get topic model diagnostics.

View source: R/metrics.R

get_diagnosticsR Documentation

Get topic model diagnostics.

Description

The MALLET topic model toolkit includes a class 'TopicModelDiagnostics' able to prepare a set of metrics on the topics of a topic model. The function 'get_diagnostics()' will return a 'data.table' with these diagnostics. See the [Mallet documentation](http://mallet.cs.umass.edu/diagnostics.php) for an explanation of the metrics.

Usage

get_diagnostics(x, n = 50L, verbose = TRUE)

Arguments

x

An instance of the RTopicModel class (java object).

n

An 'integer' value, the number of the top words that will be evaluated.

verbose

A 'logical' value, whether to show progress messages.

Value

A 'data.table'.

Examples

f <- system.file(package = "biglda", "extdata", "mallet", "lda_mallet.bin")
model <- mallet_load_topicmodel(f)
diagnostics <- get_diagnostics(model)
head(diagnostics)

PolMine/biglda documentation built on Feb. 25, 2023, 11:24 p.m.