A wrapper for the CTM function based on Blei's original code that returns a nicely-formatted topic model.
FitCtmModel(dtm, k, calc_coherence = TRUE, calc_r2 = FALSE, return_all = TRUE, ...)
A document term matrix of class
Number of topics
Do you want to calculate probabilistic coherence of topics
after the model is trained? Defaults to
Do you want to calculate R-squared after the model is trained?
Logical. Do you want the raw results of the underlying
function returned along with the formatted results? Defaults to
Returns a list with a minimum of two objects,
theta. The rows of
phi index topics and the columns index tokens.
The rows of
theta index documents and the columns index topics.