Vowpal Wabbit
multiclass.h
Go to the documentation of this file.
1 /*
2 Copyright (c) by respective owners including Yahoo!, Microsoft, and
3 individual contributors. All rights reserved. Released under a BSD
4 license as described in the file LICENSE.
5  */
6 #pragma once
7 #include "label_parser.h"
8 
9 struct example;
10 struct vw;
11 
12 namespace MULTICLASS
13 {
14 struct label_t
15 {
16  uint32_t label;
17  float weight;
18 };
19 
20 extern label_parser mc_label;
21 
22 void print_update_with_probability(vw& all, example& ec, uint32_t prediction);
23 void print_update_with_score(vw& all, example& ec, uint32_t prediction);
24 
25 void finish_example(vw& all, example& ec, bool update_loss);
26 
27 template <class T>
28 void finish_example(vw& all, T&, example& ec)
29 {
30  finish_example(all, ec, true);
31 }
32 
33 template <class T>
35 {
36  finish_example(all, ec, false);
37 }
38 } // namespace MULTICLASS
void finish_example_without_loss(vw &all, T &, example &ec)
Definition: multiclass.h:34
void print_update_with_probability(vw &all, example &ec, uint32_t pred)
Definition: multiclass.cc:149
void print_update_with_score(vw &all, example &ec, uint32_t pred)
Definition: multiclass.cc:153
label_parser mc_label
Definition: multiclass.cc:93
void finish_example(vw &all, example &ec, bool update_loss)
Definition: multiclass.cc:155