summaryrefslogtreecommitdiff
path: root/gi/pf/pyp_word_model.cc
blob: 12df4abf4327dba532a8c710e34a984ef9e0f475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "pyp_word_model.h"

#include <iostream>

using namespace std;

void PYPWordModel::ResampleHyperparameters(MT19937* rng) {
  r.resample_hyperparameters(rng);
  cerr << " PYPWordModel(d=" << r.discount() << ",s=" << r.strength() << ")\n";
}

void PYPWordModel::Summary() const {
  cerr << "PYPWordModel: generations=" << r.num_customers()
       << " PYP(d=" << r.discount() << ",s=" << r.strength() << ')' << endl;
  for (CCRP<vector<WordID> >::const_iterator it = r.begin(); it != r.end(); ++it)
    cerr << "   " << it->second.total_dish_count_
              << " (on " << it->second.table_counts_.size() << " tables) "
              << TD::GetString(it->first) << endl;
}