The model-level metrics of evaluate_topic_models() for a
single model: means over topics of coherence and exclusivity, topic
diversity, mean and maximum similarity between topics, and the ldatuning
criteria. Held-out likelihood and residuals need a held-out sample and
are computed by evaluate_topic_models().
Usage
model_metrics(
model,
documents,
metrics = c("coherence", "exclusivity", "diversity", "similarity", "ldatuning"),
n_terms = 10L,
frexw = 0.7,
n_diversity = 25L,
...
)Arguments
- model
A fitted
stmmodel (or a list withbeta$logbeta[[1]]andvocab).- documents
The documents the model was fitted on (
stmformat).- metrics
Character vector among
"coherence","exclusivity","diversity","similarity","ldatuning".- n_terms
Integer scalar, number of top words per topic (
Min stm).- frexw
FREX weight of exclusivity.
- n_diversity
Number of top words used for diversity (25 in Dieng et al. 2020).
- ...
Not used: an argument renamed in the development version of mintR gives an error naming its replacement.
