Options

keyATM takes various options. You can set options through a list.

my_options <- list(seed        = 100,
                   iterations  = 1500,
                   verbose     = FALSE,
                   llk_per     = 10,
                   use_weights = TRUE,
                   prune       = TRUE,
                   thinning    = 5,
                   store_theta = FALSE)

out <- keyATM(docs      = keyATM_docs,    # text input
              regular_k = 3,              # number of regular topics
              keywords  = bills_keywords, # keywords
              model     = "basic",        # select the model
              options   = my_options,     # use your own option list
              keep = c("Z")               # keep a specific object in the output
             )

seed

This is a seed used to generate random numbers. The same seed is used for initialization and fitting the model (set.seed() is executed before both initialization and fitting). If you do not provide seed, keyATM randomly selects a seed for you.

iterations

The default value is 1500.

verbose

Default is FALSE. If it is true, it shows values of log-likelihood and perplexity.

llk_per

keyATM calculates and stores the log-likelihood and perplexity. The default value is 10.

use_weights

The default value is TRUE (use weights). We follow the weighting Scheme in Wilson \& Chew (2010). If you do not want to use weights, please set it to 0. Please check our paper for details.

prune

Prune keywords that do not appear in the documents.

thinning

The default value is 5 and keyATM keeps every $5$ daraws from the sampling.

store_theta

The default value is FALSE. Storing the value of thetas allows the calculation of credible intervals.

Priors

You can manually set priors, but we do not recommend doing it unless you understandd the consequences.

alpha

Prior for the document-topic distribution. This option only works for base model.

beta

Prior for the no-keyword topic-word distribution.

beta_s

Prior for the keyword topic-word distribution.

gamma

Prior for the probability of using keywords in a topic.

Keep

You can specify which output to keep (cf. Calculating heterogeneity).



Shusei-E/keyATM-OLD documentation built on Dec. 23, 2019, 6:42 p.m.