Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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

mallet

A wrapper around the Java machine learning tool MALLET

v1.0
MIT + file LICENSE
Authors
David Mimno
Initial release
2013-07-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.