View source: R/number_topics.R
| number_topics | R Documentation | 
Determines the optimal number of Latent topics within a data frame by tuning the Latent Dirichlet Allocation (LDA) model parameters. Uses the 'ldatuning' package and outputs an ldatuning plot. __This process can be time consuming depending on the size of the input data frame.__
number_topics(
  DataFrame,
  num_cores = 1L,
  min_clusters = 2,
  max_clusters = 12,
  skip = 2,
  set_seed = 1234
)
DataFrame | 
 Data Frame of Twitter Data.  | 
num_cores | 
 The number of CPU cores to processes models simultaneously (2L for dual core processor).  | 
min_clusters | 
 Lower range for the number of clusters.  | 
max_clusters | 
 Upper range for the number of clusters.  | 
skip | 
 Integer; The number of clusters to skip between entries.  | 
set_seed | 
 Seed for reproducible results.  | 
A Tidy DataFrame.
## Not run: 
library(saotd)
data <- raw_tweets
LDA_Topic_Plot <- number_topics(DataFrame = data,
                                num_cores = 2L,
                                min_clusters = 2,
                                max_clusters = 12, 
                                skip = 2,
                                set_seed = 1234)
LDA_Topic_Plot 
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.