CTM | R Documentation |
Estimate a CTM model using for example the VEM algorithm.
CTM(x, k, method = "VEM", control = NULL, model = NULL, ...)
x |
Object of class |
k |
Integer; number of topics. |
method |
The method to be used for fitting; currently only
|
control |
A named list of the control parameters for estimation
or an object of class |
model |
Object of class |
... |
Currently not used. |
The C code for CTM from David M. Blei and co-authors is used to estimate and fit a correlated topic model.
CTM()
returns an object of class
"CTM"
.
Bettina Gruen
Blei D.M., Lafferty J.D. (2007). A Correlated Topic Model of Science. The Annals of Applied Statistics, 1(1), 17–35.
"CTM_VEMcontrol"
data("AssociatedPress", package = "topicmodels")
ctm <- CTM(AssociatedPress[1:20,], k = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.