mallet (version 1.0)

mallet.topic.hclust: Return a hierarchical clustering of topics

Description

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.

Usage

mallet.topic.hclust(doc.topics, topic.words, balance)

Arguments

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).

See Also

This function uses data matrices from mallet.doc.topics and mallet.topic.words

Examples

Run this code
## 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)

Run the code above in your browser using DataLab