diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-02-17 13:01:54 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-02-17 13:01:54 -0500 |
commit | 4845fbb1288c92ce73f84d3c7878b7c81dc09654 (patch) | |
tree | 5202ee5e0699c3178a7c0288d79419c44a964e9f /training/mr_em_adapted_reduce.cc | |
parent | dbe064a15aa78b344d13db5bd831cc9e0a9bbac1 (diff) |
boost version checking, check for Eigen, get rid of old digamma stuff
Diffstat (limited to 'training/mr_em_adapted_reduce.cc')
-rw-r--r-- | training/mr_em_adapted_reduce.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/training/mr_em_adapted_reduce.cc b/training/mr_em_adapted_reduce.cc index d4c16a2f..f65b5440 100644 --- a/training/mr_em_adapted_reduce.cc +++ b/training/mr_em_adapted_reduce.cc @@ -10,7 +10,7 @@ #include "fdict.h" #include "weights.h" #include "sparse_vector.h" -#include "em_utils.h" +#include "m.h" using namespace std; namespace po = boost::program_options; @@ -63,11 +63,11 @@ void Maximize(const bool use_vb, assert(tot > 0.0); double ltot = log(tot); if (use_vb) - ltot = digamma(tot + total_event_types * alpha); + ltot = Md::digamma(tot + total_event_types * alpha); for (SparseVector<double>::const_iterator it = counts.begin(); it != counts.end(); ++it) { if (use_vb) { - pc->set_value(it->first, NoZero(digamma(it->second + alpha) - ltot)); + pc->set_value(it->first, NoZero(Md::digamma(it->second + alpha) - ltot)); } else { pc->set_value(it->first, NoZero(log(it->second) - ltot)); } |