toLDAvis {stm} | R Documentation |
Wrapper to launch LDAvis topic browser.
Description
Tool for exploring topic/word distributions using LDAvis topic browser.
Usage
toLDAvis(
mod,
docs,
R = 30,
plot.opts = list(xlab = "PC1", ylab = "PC2"),
lambda.step = 0.1,
out.dir = tempfile(),
open.browser = interactive(),
as.gist = FALSE,
reorder.topics = TRUE
)
Arguments
mod |
STM object. Output from stm function. |
docs |
Documents object passed to |
R |
Passed to |
plot.opts |
Passed to |
lambda.step |
Passed to |
out.dir |
Passed to |
open.browser |
Passed to |
as.gist |
Passed to |
reorder.topics |
Passed to |
Details
Tool for exploring topic/word distributions using LDAvis topic browser. Development build of LDAvis available at https://github.com/cpsievert/LDAvis or download from CRAN. Note: LDAvis may renumber the topics.
References
Carson Sievert and Kenny Shirley. LDAvis: Interactive Visualization of Topic Models. R package version 0.3.1. https://github.com/cpsievert/LDAvis
Examples
mod <- stm(poliblog5k.docs, poliblog5k.voc, K=25,
prevalence=~rating, data=poliblog5k.meta,
max.em.its=2, init.type="Spectral")
#please don't run a model with 2 iterations
#this is done here to make it run quickly.
toLDAvis(mod=mod, docs=poliblog5k.docs)