number_topics {saotd} | R Documentation |
Number Topics
Description
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.__
Usage
number_topics(
DataFrame,
num_cores = 1L,
min_clusters = 2,
max_clusters = 12,
skip = 2,
set_seed = 1234
)
Arguments
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. |
Value
A Tidy DataFrame.
Examples
## 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)
[Package saotd version 0.3.1 Index]