One row per topic, to spot the topics to read carefully rather than only to choose K:
prevalence: mean topic proportion over documents;tokens: expected number of words assigned to the topic, \(\sum_d \theta_{dk} N_d\);coherence_umass,coherence_npmi:topic_coherence();exclusivity:topic_exclusivity();background_distance: Jensen-Shannon distance between the topic's word distribution and the word distribution of the whole corpus, in [0, 1]. A topic close to the corpus distribution (small distance) is a "background" or junk topic made of common words, as in AlSumait et al.'s (2009) ranking of topic significance;max_similarity,most_similar: the closest other topic (cosine,topic_similarity()): a high value suggests a split theme;top_terms: most probable words.
Arguments
- model
A fitted
stmmodel (or a list withbeta$logbeta[[1]]andvocab).- documents
The documents the model was fitted on (
stmformat).- n_terms
Integer scalar, number of top words per topic (
Min stm).- frexw
FREX weight of exclusivity.
- n_label
Number of words in
top_terms.- ...
Not used: an argument renamed in the development version of mintR gives an error naming its replacement.
References
AlSumait, L., Barbará, D., Gentle, J. and Domeniconi, C. (2009). Topic significance ranking of LDA generative models. Machine Learning and Knowledge Discovery in Databases (ECML PKDD 2009), 67-82.
Examples
if (FALSE) { # \dontrun{
diagnostics <- topic_diagnostics(fit, stm_data$documents)
plot_topic_diagnostics(diagnostics)
} # }
