JSTOR_lda: Generate a topic model with K topics using the implementation...

Description Usage Arguments Value Examples

Description

Generates a topic model with K topics using Latent Dirichlet allocation (LDA, with the lda package) For use with JSTOR's Data for Research datasets (http://dfr.jstor.org/).

Usage

1
JSTOR_lda(unpack1grams, nouns, K, alpha = 50/K)

Arguments

unpack1grams

object returned by the function JSTOR_unpack1grams.

nouns

the object returned by the function JSTOR_dtmtonouns.

K

the number of topics that the model should contain

alpha

The scalar value of the Dirichlet hyperparameter for topic proportions. Higher values lead to more uniform distributions of topics over documents. Default is 50/K

Value

Returns a data frame with documents as rows, topics as columns and posterior probabilities as cell values.

Examples

1
## lda1 <- JSTOR_lda(unpack1grams, nouns, K = 150) 

benmarwick/JSTORr documentation built on May 12, 2019, 12:59 p.m.