From e1feb0e538e904ad161cb7fe4ab3b25964d25f2f Mon Sep 17 00:00:00 2001 From: philblunsom Date: Mon, 23 Aug 2010 18:20:37 +0000 Subject: fixed llh and changed to random initialiser. git-svn-id: https://ws10smt.googlecode.com/svn/trunk@615 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/pyp-topics/src/pyp-topics.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gi') diff --git a/gi/pyp-topics/src/pyp-topics.cc b/gi/pyp-topics/src/pyp-topics.cc index 16cc9588..4de52fd7 100644 --- a/gi/pyp-topics/src/pyp-topics.cc +++ b/gi/pyp-topics/src/pyp-topics.cc @@ -215,7 +215,7 @@ void PYPTopics::sample_corpus(const Corpus& corpus, int samples, } if (m_use_topic_pyp) { - //m_topic_pyp.resample_prior(rnd); + m_topic_pyp.resample_prior(rnd); log_p += m_topic_pyp.log_restaurant_prob(); } @@ -248,7 +248,7 @@ PYPTopics::F PYPTopics::hresample_docs(int start, int end) assert(start <= end); for (int i=start; i < end; ++i) { - //m_document_pyps[i].resample_prior(rnd); + m_document_pyps[i].resample_prior(rnd); log_p += m_document_pyps[i].log_restaurant_prob(); if (resample_counter++ % 5000 == 0) { std::cerr << "."; std::cerr.flush(); @@ -265,7 +265,7 @@ PYPTopics::F PYPTopics::hresample_topics() for (PYPs::iterator pypIt=levelIt->begin(); pypIt != levelIt->end(); ++pypIt) { - //pypIt->resample_prior(rnd); + pypIt->resample_prior(rnd); log_p += pypIt->log_restaurant_prob(); } std::cerr << log_p << std::endl; -- cgit v1.2.3