From 0b598b997a7c1d2d9dc255cc2ff1bf9bb2c425a1 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 15 Mar 2012 22:47:04 -0400 Subject: bayes bayes bayes --- utils/ccrp.h | 4 ++++ utils/mfcr.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'utils') diff --git a/utils/ccrp.h b/utils/ccrp.h index 4a8b80e7..390d4994 100644 --- a/utils/ccrp.h +++ b/utils/ccrp.h @@ -55,6 +55,10 @@ class CCRP { double discount() const { return discount_; } double strength() const { return strength_; } + void set_hyperparameters(double d, double s) { + discount_ = d; strength_ = s; + check_hyperparameters(); + } void set_discount(double d) { discount_ = d; check_hyperparameters(); } void set_strength(double a) { strength_ = a; check_hyperparameters(); } diff --git a/utils/mfcr.h b/utils/mfcr.h index 886f01ef..4aacb567 100644 --- a/utils/mfcr.h +++ b/utils/mfcr.h @@ -73,6 +73,10 @@ class MFCR { double discount() const { return discount_; } double strength() const { return strength_; } + void set_hyperparameters(double d, double s) { + discount_ = d; strength_ = s; + check_hyperparameters(); + } void set_discount(double d) { discount_ = d; check_hyperparameters(); } void set_strength(double a) { strength_ = a; check_hyperparameters(); } -- cgit v1.2.3