TopicModel-class {topicmodels}R Documentation

Virtual class "TopicModel"

Description

Fitted topic models.

Objects from the Class

Objects of class "LDA" are returned by LDA() and of class "CTM" by CTM().

Slots

Class "TopicModel" contains

call:
Object of class "call"
Dim:
Object of class "integer"; number of documents and terms.
control:
Object of class "TopicModelcontrol"; options using for estimating the topic model.
k:
Object of class "integer"; number of topics.
terms:
Vector containing the terms.
documents:
Vector containing the document names.
beta:
Object of class "matrix"; parameters of the word distribution for each topic.
gamma:
Object of class "matrix"; parameters for the posterior topic distribution for each document.
wordassignments:
Object of class "simple_triplet_matrix"; most probable topic for each observed word in each document.

Class "VEM" contains

loglikelihood:
Object of class "numeric"; the log likelihood of each document given the parameters for the topic distribution and for the word distribution of each topic is approximated using the variational parameters and underestimates the log likelihood by the Kullback-Leibler divergence between the variational posterior probability and the true posterior probability

Class "LDA" extends class "TopicModel" and has the additional slots

alpha:
Object of class "numeric"; parameter of the Dirichlet distribution for topics over documents.

Class "LDA_Gibbs" extends class "LDA" and has the additional slots

delta:
Object of class "numeric"; parameter for the prior distribution of the words distribution for topics.

Class "CTM" extends class "TopicModel" and has the additional slots

mu:
Object of class "numeric"; mean of the topic distribution on the logit scale.
Sigma:
Object of class "matrix"; variance-covariance matrix of topics on the logit scale.

Class "CTM_VEM" extends classes "CTM" and "VEM" and has the additional slots

nusqared:
Object of class "matrix"; variance of the variational distribution on the mu.

Author(s)

Bettina Gruen


[Package topicmodels version 0.0-3 Index]