TopicModelcontrol-class {topicmodels} | R Documentation |
Different classes for controlling the estimation of topic models
Description
Classes to control the estimation of topic models which are inheriting
from the virtual base class "TopicModelcontrol"
.
Objects from the Class
Objects can be created from named lists.
Slots
Class "TopicModelcontrol"
contains
seed
:Object of class
"integer"
; used to set the seed in the external code for VEM estimation and to callset.seed
for Gibbs sampling. For Gibbs sampling it can also be set toNA
(default) to avoid changing the seed of the random number generator in the model fitting call.verbose
:Object of class
"integer"
. If a positive integer, then the progress is reported everyverbose
iterations. If 0 (default), no output is generated during model fitting.save
:Object of class
"integer"
. If a positive integer the estimated model is saved allverbose
iterations. If 0 (default), no output is generated during model fitting.prefix
:Object of class
"character"
; path indicating where to save the intermediate results.nstart
:Object of class
"integer"
. Number of repeated random starts.best
:Object of class
"logical"
; ifTRUE
only the model with the maximum (posterior) likelihood is returned, by default equalsTRUE
.keep
:Object of class
"integer"
; if a positive integer, the log-likelihood is saved everykeep
iterations.estimate.beta
:Object of class
"logical"
; controls if beta, the term distribution of the topics, is fixed, by default equalsTRUE
.
Class "VEMcontrol"
contains
var
:Object of class
"OPTcontrol"
; controls the variational inference for a single document, by defaultiter.max
equals 500 andtol
10^-6.em
:Object of class
"OPTcontrol"
; controls the variational EM algorithm, by defaultiter.max
equals 1000 andtol
10^-4.initialize
:Object of class
"character"
; one of"random"
,"seeded"
and"model"
, by default equals"random"
.
Class "LDAcontrol"
extends class "TopicModelcontrol"
and
has the additional slots
alpha
:Object of class
"numeric"
; initial value for alpha.
Class "LDA_VEMcontrol"
extends classes
"LDAcontrol"
and "VEMcontrol"
and has the
additional slots
estimate.alpha
:Object of class
"logical"
; indicates if the parameter alpha is fixed a-priori or estimated, by default equalsTRUE
.
Class "LDA_Gibbscontrol"
extends classes
"LDAcontrol"
and has the additional slots
delta
:Object of class
"numeric"
; initial value for delta, by default equals 0.1.iter
:Object of class
"integer"
; number of Gibbs iterations (after omitting theburnin
iterations), by default equals 2000.thin
:Object of class
"integer"
; number of omitted in-between Gibbs iterations, by default equalsiter
.burnin
:Object of class
"integer"
; number of omitted Gibbs iterations at beginning, by default equals 0.initialize
:Object of class
"character"
; one of"random"
,"beta"
and"z"
, by default equals"random"
.
Class "CTM_VEMcontrol"
extends classes
"TopicModelcontrol"
and "VEMcontrol"
and has the
additional slots
cg
:Object of class
"OPTcontrol"
; controls the conjugate gradient iterations in fitting the variational mean and variance per document, by defaultiter.max
equals 500 andtol
10^-5.
Class "OPTcontrol"
contains
iter.max
:Object of class
"integer"
; maximum number of iterations.tol
:Object of class
"numeric"
; tolerance for convergence check.
Author(s)
Bettina Gruen