Vowpal Wabbit
vowpalwabbit
cb.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
8
#include "
label_parser.h
"
9
#include <vector>
10
11
struct
example
;
12
13
namespace
CB
14
{
15
struct
cb_class
16
{
17
float
cost
;
// the cost of this class
18
uint32_t
action
;
// the index of this class
19
float
probability
;
// new for bandit setting, specifies the probability the data collection policy chose this class
20
// for importance weighting
21
float
partial_prediction
;
// essentially a return value
22
bool
operator==
(
cb_class
j) {
return
action == j.
action
; }
23
};
24
25
struct
label
26
{
27
v_array<cb_class>
costs
;
28
float
weight
;
29
};
30
31
extern
label_parser
cb_label
;
// for learning
32
bool
ec_is_example_header
(
example
const
& ec);
// example headers look like "shared"
33
34
void
print_update
(
vw
& all,
bool
is_test,
example
& ec, std::vector<example*>* ec_seq,
bool
action_scores
);
35
}
// namespace CB
36
37
namespace
CB_EVAL
38
{
39
struct
label
40
{
41
uint32_t
action
;
42
CB::label
event
;
43
};
44
45
extern
label_parser
cb_eval
;
// for evaluation of an arbitrary policy.
46
}
// namespace CB_EVAL
CB_EVAL::cb_eval
label_parser cb_eval
Definition:
cb.cc:292
CB::ec_is_example_header
bool ec_is_example_header(example const &ec)
Definition:
cb.cc:170
CB::label::weight
float weight
Definition:
cb.h:28
CB::cb_class::operator==
bool operator==(cb_class j)
Definition:
cb.h:22
ACTION_SCORE::action_scores
v_array< action_score > action_scores
Definition:
action_score.h:10
CB::label::costs
v_array< cb_class > costs
Definition:
cb.h:27
CB_EVAL::label::action
uint32_t action
Definition:
cb.h:41
CB_EVAL::label::event
CB::label event
Definition:
cb.h:42
vw
Definition:
global_data.h:369
CB::cb_class
Definition:
cb.h:15
CB::print_update
void print_update(vw &all, bool is_test, example &ec, multi_ex *ec_seq, bool action_scores)
Definition:
cb.cc:180
CB
Definition:
cb.cc:15
CB::cb_class::action
uint32_t action
Definition:
cb.h:18
CB::cb_class::partial_prediction
float partial_prediction
Definition:
cb.h:21
label_parser
Definition:
label_parser.h:10
CB::cb_class::probability
float probability
Definition:
cb.h:19
example
Definition:
example.h:54
label_parser.h
CB::cb_label
label_parser cb_label
Definition:
cb.cc:167
CB::label
Definition:
cb.h:25
CB::cb_class::cost
float cost
Definition:
cb.h:17
CB_EVAL
Definition:
cb.cc:219
CB_EVAL::label
Definition:
cb.h:39
v_array
Definition:
reductions_fwd.h:10
Generated on Thu Apr 9 2020 14:45:24 for Vowpal Wabbit by
1.8.13