R/doc_prominence.R
doc_prominence.Rd
Calculate the document prominence of each topic in a topic model based on either the number of documents with an estimated gamma probability above a threshold or the number of documents where a topic has the highest estimated gamma probability
doc_prominence(
topic_model,
method = c("gamma_threshold", "largest_gamma"),
gamma_threshold = 0.2
)
a fitted topic model object from one of the following:
tm-class
a string indicating which method to use - "gamma_threshold" or "largest_gamma", the default is "gamma_threshold"
a number between 0 and 1 indicating the gamma threshold to be used when using the gamma threshold method, the default is 0.2
A vector of document prominences with length equal to the number of topics in the fitted model
Jordan Boyd-Graber, David Mimno, and David Newman, 2014. Care and Feeding of Topic Models: Problems, Diagnostics, and Improvements. CRC Handbooks ofModern Statistical Methods. CRC Press, Boca Raton, Florida.