Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@hunch.net>2014-03-25 17:17:49 +0400
committerJohn Langford <jl@hunch.net>2014-03-25 17:17:49 +0400
commita2c65fc357d097a7c068a24b76efd97578fc0ffa (patch)
treefd3dc03572d995b7cc5c98034224e76170c959be /vowpalwabbit/cbify.cc
parent4d7b712e5f95ffdee48aa5b8e25734d3ad44cc9d (diff)
refactor multiclass out of oaa
Diffstat (limited to 'vowpalwabbit/cbify.cc')
-rw-r--r--vowpalwabbit/cbify.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/vowpalwabbit/cbify.cc b/vowpalwabbit/cbify.cc
index a00e7555..467b2c84 100644
--- a/vowpalwabbit/cbify.cc
+++ b/vowpalwabbit/cbify.cc
@@ -1,5 +1,5 @@
#include <float.h>
-#include "oaa.h"
+#include "multiclass.h"
#include "vw.h"
#include "csoaa.h"
#include "cb.h"
@@ -52,7 +52,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.
- OAA::mc_label* ld = (OAA::mc_label*)ec.ld;
+ MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld;
//Use CB to find current prediction for remaining rounds.
if (data.tau && is_learn)
{
@@ -81,7 +81,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.
- OAA::mc_label* ld = (OAA::mc_label*)ec.ld;
+ MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld;
ec.ld = &(data.cb_label);
data.cb_label.costs.erase();
@@ -117,7 +117,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.
- OAA::mc_label* ld = (OAA::mc_label*)ec.ld;
+ MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld;
ec.ld = &(data.cb_label);
data.cb_label.costs.erase();
@@ -206,7 +206,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.
- OAA::mc_label* ld = (OAA::mc_label*)ec.ld;
+ MULTICLASS::mc_label* ld = (MULTICLASS::mc_label*)ec.ld;
data.counter++;
data.count.erase();
@@ -294,7 +294,7 @@ namespace CBIFY {
void finish_example(vw& all, cbify&, example& ec)
{
- OAA::output_example(all, ec);
+ MULTICLASS::output_example(all, ec);
VW::finish_example(all, &ec);
}
@@ -340,7 +340,7 @@ namespace CBIFY {
all.options_from_file.append(ss.str());
}
- all.p->lp = OAA::mc_label_parser;
+ all.p->lp = MULTICLASS::mc_label_parser;
learner* l;
if (vm.count("cover"))
{