## Not run:
# library(rJava)
# x <- tmCorpus(lapply(1:100, function(x) paste(sample(LETTERS, 11),
# collapse = "")))
#
# model <- train(x)
# new_x <- tmCorpus(lapply(1:100, function(x) paste(sample(LETTERS, 11),
# collapse = "")))
#
#
# topic_table(model)
#
# y <- DocumentTermMatrix(x)
# rownames(y) <- meta(x, "title")
# jss_TM <-
# list(VEM = train(y, k = k, control = list(seed = SEED)),
# VEM_fixed = train(y, k = k,
# control = list(estimate.alpha = FALSE, seed = SEED)),
# Gibbs = train(y, k = k, method = "Gibbs",
# control = list(seed = SEED, burnin = 1000,
# thin = 100, iter = 1000)))
# pred_VEM <- predict(jss_TM$VEM, new_x)
# ## End(Not run)
Run the code above in your browser using DataLab