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

mallet.top.words

Get the most probable words and their probabilities for one topic.


Description

This function returns a data frame with two columns, one containing the most probable words as character values, the second containing the weight assigned to that word in the word weights vector you supplied.

Usage

mallet.top.words(topic.model, word.weights, num.top.words)

Arguments

topic.model

The model returned by MalletLDA

word.weights

A vector of word weights for one topic, usually a row from the topic.words matrix from mallet.topic.words.

num.top.words

The number of most probable words to return. If not specified, defaults to 10.


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.