The function to predict the topics of a new document with the trained model

ldaPreds(
  model,
  data,
  id_col,
  data_col,
  num_iterations = 100,
  seed = 42,
  save_dir = "./results",
  load_dir = NULL
)

Arguments

model

(list) The trained model

data

(tibble) The new data

id_col

(string) The data column with the ids of the new documents

data_col

(string) The data column with the text of the new documents

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 predictions will not be saved

load_dir

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

Value

A tibble of the predictions