mallet_model: The model object

mallet_modelR Documentation

The model object

Description

A topic model is a complicated beastie, and exploring it requires keeping track of a number of different kinds of data. The mallet_model object strives to encapsulate some of this for you. Package users shouldn't need to invoke the constructor explicitly; to obtain model objects, use either train_model or load_mallet_model. The summary method indicates which elements of the model have been loaded into R's memory.

Usage

mallet_model(
  doc_topics = NULL,
  doc_ids = NULL,
  vocab = NULL,
  top_words = NULL,
  topic_words = NULL,
  params = NULL,
  hyper = NULL,
  metadata = NULL,
  model = NULL,
  ss = NULL,
  instances = NULL
)

## S3 method for class 'mallet_model'
print(x)

## S3 method for class 'mallet_model'
summary(x)

## S3 method for class 'mallet_model_summary'
print(x)

Arguments

doc_topics

document-topic matrix

doc_ids

vector of document ids corresponding to rows of doc_topics

vocab

vector of word types corresponding to columns of topic_words

top_words

data frame with top-ranked words and their weights for each topic

topic_words

topic-word matrix (expected to be sparse)

params

list of modeling parameters

hyper

list of estimated hyperparameters α and β

metadata

data frame of metadata

model

reference to an RTopicModel object from MALLET

ss

final Gibbs sampling state represented as "simplified" big.matrix

instances

reference to InstanceList (redundant if model specified)

Details

Any of the parameters to the constructor can be omitted. No validation is performed.


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