The function to create and train and lda Model

ldaModel(
  dtm,
  num_topics = 20,
  num_top_words = 10,
  num_iterations = 1000,
  seed = 42L,
  save_dir = "./results",
  load_dir = NULL
)

Arguments

dtm

(R_obj) The document term matrix

num_topics

(integer) The number of topics to be created

num_top_words

(integer) The number of top words to be displayed

num_iterations

(integer) The number of iterations to run the model

seed

(integer) The seed to set for reproducibility

save_dir

(string) The directory to save the model, if NULL, the model will not be saved

load_dir

(string) The directory to load the model from, if NULL, the model will not be loaded

Value

A list of the model, the top terms, the labels, the coherence, and the prevalence