summaryrefslogtreecommitdiff
path: root/gi
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
commite1feb0e538e904ad161cb7fe4ab3b25964d25f2f (patch)
tree0d254f74e6750305992c50eb843d3cae06a9553e /gi
parent94e233126283d18a474260e9791401e8b3b486d5 (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')
-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;