powered by
Estimate a CTM model using for example the VEM algorithm.
CTM(x, k, method = "VEM", control = NULL, model = NULL, ...)
CTM() returns an object of class
CTM()
"CTM".
"CTM"
Object of class "DocumentTermMatrix" with term-frequency weighting or an object coercible to a "simple_triplet_matrix" with integer entries.
"DocumentTermMatrix"
"simple_triplet_matrix"
Integer; number of topics.
The method to be used for fitting; currently only method = "VEM" is supported.
method = "VEM"
A named list of the control parameters for estimation or an object of class "CTM_VEMcontrol".
"CTM_VEMcontrol"
Object of class "CTM" for initialization.
Currently not used.
Bettina Gruen
The C code for CTM from David M. Blei and co-authors is used to estimate and fit a correlated topic model.
Blei D.M., Lafferty J.D. (2007). A Correlated Topic Model of Science. The Annals of Applied Statistics, 1(1), 17--35.
data("AssociatedPress", package = "topicmodels") ctm <- CTM(AssociatedPress[1:20,], k = 2)
Run the code above in your browser using DataLab