topic_divergences: Topic distance functions

topic_divergencesR Documentation

Topic distance functions

Description

Two methods for extracting a matrix of topic-topic distances.

Usage

topic_divergences(m, n_words = 1000)

doc_topic_cor(m)

Arguments

m

mallet_model model object

n_words

Number of columns of the topic-word matrix to use in calculation. The words with the top n_words total weight in the corpus are used. Set to Inf or to ncol(topic_words(m)) to use all the words, but be warned that R rapidly approaches its limits with large vocabularies. Ordinarily, for a vocabulary of tens of thousands of features, n_words=1000 will be a fine approximation.

Value

For doc_topic_cor, a matrix of correlations between the series of log-document proportions; for topic_divergences, a matrix of J-S divergences between topic distributions over words.

See Also

row_dists, topic_scaled_2d


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.