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 
8 #include "label_parser.h"
9 
10 namespace CB {
11   struct cb_class {
12     float cost;  // the cost of this class
13     uint32_t action;  // the index of this class
14     float probability; //new for bandit setting, specifies the probability the data collection policy chose this class for importance weighting
15     float partial_prediction;//essentially a return value
16     bool operator==(cb_class j){return action == j.action;}
17   };
18 
19   struct label {
20     v_array<cb_class> costs;
21   };
22 
23   extern label_parser cb_label;//for learning
24 }
25 
26 namespace CB_EVAL {
27   struct label {
28     uint32_t action;
29     CB::label event;
30   };
31 
32   extern label_parser cb_eval;//for evaluation of an arbitrary policy.
33 }
34