diff options
author | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-02 14:03:50 +0000 |
---|---|---|
committer | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-02 14:03:50 +0000 |
commit | 193efc814634c720100a82381f7579a76229d655 (patch) | |
tree | 48f3704d2b87afd7462444e871e263fbe625cde7 /gi/pyp-topics/src/pyp-topics.cc | |
parent | e570a00942122789900de948f4e4ccc807fb347b (diff) |
Small change to streamline sampling calculation.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@102 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src/pyp-topics.cc')
-rw-r--r-- | gi/pyp-topics/src/pyp-topics.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gi/pyp-topics/src/pyp-topics.cc b/gi/pyp-topics/src/pyp-topics.cc index d8a8d815..b727458b 100644 --- a/gi/pyp-topics/src/pyp-topics.cc +++ b/gi/pyp-topics/src/pyp-topics.cc @@ -215,7 +215,9 @@ int PYPTopics::sample(const DocumentId& doc, const Term& term) { F topic_prob = m_topic_p0; if (m_use_topic_pyp) topic_prob = m_topic_pyp.prob(k, m_topic_p0); - F p_k_d = m_document_pyps[doc].prob(k, topic_prob); + + //F p_k_d = m_document_pyps[doc].prob(k, topic_prob); + F p_k_d = m_document_pyps[doc].unnormalised_prob(k, topic_prob); sum += (p_w_k*p_k_d); sums.push_back(sum); |