ericproffitt / TopicModelsVB.jl

A Julia package for variational Bayesian topic modeling.
Other
81 stars 8 forks source link

probability distribution of topics and number of keywords within topics #9

Closed grassdew closed 7 years ago

grassdew commented 7 years ago

Hi,

The lda.gamma command returns a vector of weights of topics for a document. Can I get a probability distribution of topics instead? Also, can I specify the number of keywords within each topic in the showtopics command? Thank you.

ericproffitt commented 7 years ago

lda.gamma[m] is the parameter for a Dirichlet distribution, so you can get the expected probability distribution of topics for a particular document m by simply normalizing that vector.

Each topic is a probability distribution over the entire lexicon, to see, for example, the top 20 words for each topic, simply write showtopics(model, 20).

grassdew commented 7 years ago

Thanks.