FastArun2010 | R Documentation |
Fast Implementation of Arun 2014
FastArun2010(x, ...) ## S4 method for signature 'TopicModel' FastArun2010(x, doclengths) ## S4 method for signature 'matrix' FastArun2010(x, gamma, doclengths) ## S4 method for signature 'jobjRef' FastArun2010(x)
x |
A topic model. |
... |
Further arguments |
doclengths |
Integer vector. |
gamma |
The gamma matrix. |
## Not run: if (!mallet_is_installed()) mallet_install() library(polmineR) use("polmineR") speeches <- corpus("GERMAPARLMINI") %>% as.speeches(s_attribute_name = "speaker", s_attribute_date = "date") instance_list <- as.instance_list(speeches) lda <- BigTopicModel(n_topics = 25L, alpha_sum = 5.1, beta = 0.1) lda$addInstances(instance_list) lda$setNumThreads(1L) lda$setNumIterations(150L) lda$estimate() lda2 <- as_LDA(lda) FastArun2010(lda2, doclengths = summary(speeches)[["size"]]) ## End(Not run) if (!mallet_is_installed()) mallet_install() fname <- system.file(package = "biglda", "extdata", "mallet", "lda_mallet.bin") lda <- mallet_load_topicmodel(fname) FastArun2010(lda)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.