summaryrefslogtreecommitdiff
path: root/gi/pyp-topics
diff options
context:
space:
mode:
authorphilblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-23 18:20:37 +0000
committerphilblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-23 18:20:37 +0000
commit0716f879c26537cfcfc635adf5d4c7206d249aab (patch)
tree454cc509d48f21bd7f81d513f6f638ac9fd144ad /gi/pyp-topics
parent8c2bc3d36e4773844fa829f568b2524345aba3be (diff)
fixed llh and changed to random initialiser.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@615 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics')
-rw-r--r--gi/pyp-topics/src/pyp-topics.cc6
1 files changed, 3 insertions, 3 deletions
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;