blei-lab / hdp

Hierarchical Dirichlet processes. Topic models where the data determine the number of topics. This implements Gibbs sampling.
GNU General Public License v2.0
150 stars 47 forks source link

could someone shed me some light on how to calculate of the likelihood? #6

Closed louisway closed 7 years ago

louisway commented 7 years ago

In the code of state.cpp, the way to calculate the likelihood in table assignment is different from that in the word assignment, and I didn't find the details on the paper. confused by this for days, and still find little information, really appreciate it if someone could advice some details or related materials. Thank you! screen shot 2017-06-09 at 12 09 40 am

louisway commented 7 years ago

to be specific, when it sample table, it do this f_new = lgamma(m_size_vocabm_eta) - lgamma(count_sum + m_size_vocabm_eta)

and so it is for f[k]

louisway commented 7 years ago

solved. details can be found in https://arxiv.org/pdf/1201.1657.pdf. Thanks.