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-12-27 19:18:58 +0300
committerJohn Langford <jl@hunch.net>2014-12-27 19:18:58 +0300
commit43226da4724fe3aec7eb560264e3342e442e3fbd (patch)
tree5481aafc86b76037a028d60756d00f530182cebc /vowpalwabbit
parentdf46a62636dc9a7b8e3be9268a3e78ad0e7eea46 (diff)
screw tightening
Diffstat (limited to 'vowpalwabbit')
-rw-r--r--vowpalwabbit/oaa.cc10
-rw-r--r--vowpalwabbit/oaa.h4
2 files changed, 3 insertions, 11 deletions
diff --git a/vowpalwabbit/oaa.cc b/vowpalwabbit/oaa.cc
index c7c87c6d..7ed02ad2 100644
--- a/vowpalwabbit/oaa.cc
+++ b/vowpalwabbit/oaa.cc
@@ -3,12 +3,7 @@ Copyright (c) by respective owners including Yahoo!, Microsoft, and
individual contributors. All rights reserved. Released under a BSD (revised)
license as described in the file LICENSE.
*/
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-#include <stdio.h>
#include <sstream>
-
#include "multiclass.h"
#include "simple_label.h"
#include "reductions.h"
@@ -16,7 +11,6 @@ license as described in the file LICENSE.
using namespace std;
using namespace LEARNER;
-using namespace MULTICLASS;
namespace OAA {
struct oaa{
@@ -27,7 +21,7 @@ namespace OAA {
template <bool is_learn>
void predict_or_learn(oaa& o, base_learner& base, example& ec) {
- multiclass mc_label_data = ec.l.multi;
+ MULTICLASS::multiclass mc_label_data = ec.l.multi;
if (mc_label_data.label == 0 || (mc_label_data.label > o.k && mc_label_data.label != (uint32_t)-1))
cout << "label " << mc_label_data.label << " is not in {1,"<< o.k << "} This won't work right." << endl;
@@ -84,7 +78,7 @@ namespace OAA {
data.all = &all;
*all.file_options << " --oaa " << data.k;
- all.p->lp = mc_label;
+ all.p->lp = MULTICLASS::mc_label;
learner<oaa>& l = init_learner(&data, all.l, data.k);
l.set_learn(predict_or_learn<true>);
diff --git a/vowpalwabbit/oaa.h b/vowpalwabbit/oaa.h
index 640a952b..de1b08ab 100644
--- a/vowpalwabbit/oaa.h
+++ b/vowpalwabbit/oaa.h
@@ -5,6 +5,4 @@ license as described in the file LICENSE.
*/
#pragma once
namespace OAA
-{
- LEARNER::base_learner* setup(vw& all, po::variables_map& vm);
-}
+{ LEARNER::base_learner* setup(vw& all, po::variables_map& vm); }