my_searchK | R Documentation |
This function is just like stm's searchK, but it uses tidyverse and allows a formula for prevalence. Adapted from Julia Silge's blog.
my_searchK(documents, K, prevalence = ~1, seed1 = 19, ...)
documents |
Quanteda dfm object. |
K |
Numeric vector of numbers of topics to try. |
prevalence |
Formula of topic prevalence. |
seed1 |
Random seed to use. |
... |
Other arguments to pass to |
A tibble with the metrics output by searchK, plus a column for the fitted model for each value of K tried.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.