diff options
author | John Langford <jl@hunch.net> | 2014-04-23 02:50:14 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2014-04-23 02:50:14 +0400 |
commit | 8e652a9b5b59f723f32f98cf3c078e1b5ee8676c (patch) | |
tree | 33d629cddeced544410792c18a7321145deb128d /vowpalwabbit/cbify.cc | |
parent | 0e7a0da366d46f4acb4e051f7fcbf73dea9f5efb (diff) |
refactor problem types a bit
Diffstat (limited to 'vowpalwabbit/cbify.cc')
-rw-r--r-- | vowpalwabbit/cbify.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vowpalwabbit/cbify.cc b/vowpalwabbit/cbify.cc index e264ca20..ee30c7bd 100644 --- a/vowpalwabbit/cbify.cc +++ b/vowpalwabbit/cbify.cc @@ -53,7 +53,7 @@ namespace CBIFY { template <bool is_learn> void predict_or_learn_first(cbify& data, learner& base, example& ec) {//Explore tau times, then act according to optimal. - MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld; + MULTICLASS::multiclass* ld = (MULTICLASS::multiclass*)ec.ld; //Use CB to find current prediction for remaining rounds. if (data.tau && is_learn) { @@ -82,7 +82,7 @@ namespace CBIFY { template <bool is_learn> void predict_or_learn_greedy(cbify& data, learner& base, example& ec) {//Explore uniform random an epsilon fraction of the time. - MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld; + MULTICLASS::multiclass* ld = (MULTICLASS::multiclass*)ec.ld; ec.ld = &(data.cb_label); data.cb_label.costs.erase(); @@ -118,7 +118,7 @@ namespace CBIFY { void predict_or_learn_bag(cbify& data, learner& base, example& ec) {//Randomize over predictions from a base set of predictors //Use CB to find current predictions. - MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld; + MULTICLASS::multiclass* ld = (MULTICLASS::multiclass*)ec.ld; ec.ld = &(data.cb_label); data.cb_label.costs.erase(); @@ -207,7 +207,7 @@ namespace CBIFY { void predict_or_learn_cover(cbify& data, learner& base, example& ec) {//Randomize over predictions from a base set of predictors //Use cost sensitive oracle to cover actions to form distribution. - MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld; + MULTICLASS::multiclass* ld = (MULTICLASS::multiclass*)ec.ld; data.counter++; data.count.erase(); @@ -341,7 +341,7 @@ namespace CBIFY { all.options_from_file.append(ss.str()); } - all.p->lp = MULTICLASS::mc_label_parser; + all.p->lp = MULTICLASS::mc_label; learner* l; if (vm.count("cover")) { |