Return a hierarchical clustering of topics
Returns a hierarchical clustering of topics that can be plotted as a dendrogram.
There are two ways of measuring topic similarity: topics may contain the some of the same words, or the may appear in some of the same documents. The balance
parameter allows you to interpolate between the similarities determined by these two methods.
mallet.topic.hclust(doc.topics, topic.words, balance)
doc.topics |
A documents by topics matrix of topic probabilities. |
topic.words |
A topics by words matrix of word probabilities. |
balance |
A value between 0.0 (use only document-level similarity) and 1.0 (use only word-level similarity). |
This function uses data matrices from
mallet.doc.topics
and
mallet.topic.words
## Not run: topic.labels <- mallet.topic.labels(topic.model, topic.words, 3) plot(mallet.topic.hclust(doc.topics, topic.words, 0.3), labels=topic.labels) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.