Vowpal Wabbit
|
Classes | |
struct | cb_to_cs |
struct | cb_to_cs_adf |
void GEN_CS::call_cs_ldf | ( | LEARNER::multi_learner & | base, |
multi_ex & | examples, | ||
v_array< CB::label > & | cb_labels, | ||
COST_SENSITIVE::label & | cs_labels, | ||
v_array< COST_SENSITIVE::label > & | prepped_cs_labels, | ||
uint64_t | offset, | ||
size_t | id = 0 |
||
) |
Definition at line 251 of file gen_cs_example.h.
References v_array< T >::clear(), COST_SENSITIVE::label::costs, v_array< T >::end(), v_array< T >::end_array, LEARNER::learner< T, E >::learn(), LEARNER::learner< T, E >::predict(), v_array< T >::push_back(), v_array< T >::resize(), and v_array< T >::size().
void GEN_CS::gen_cs_example | ( | cb_to_cs & | c, |
example & | ec, | ||
CB::label & | ld, | ||
COST_SENSITIVE::label & | cs_ld | ||
) |
Definition at line 167 of file gen_cs_example.h.
References c, GEN_CS::cb_to_cs::cb_type, CB_TYPE_DM, CB_TYPE_DR, CB_TYPE_IPS, f, gen_cs_example_dm(), gen_cs_example_ips(), gen_cs_example_mtr(), gen_cs_example_sm(), gen_cs_test_example(), and THROW.
void GEN_CS::gen_cs_example | ( | cb_to_cs_adf & | c, |
multi_ex & | ec_seq, | ||
COST_SENSITIVE::label & | cs_labels | ||
) |
Definition at line 232 of file gen_cs_example.h.
References c, GEN_CS::cb_to_cs_adf::cb_type, CB_TYPE_DR, CB_TYPE_IPS, CB_TYPE_MTR, gen_cs_example_ips(), gen_cs_example_mtr(), and THROW.
void GEN_CS::gen_cs_example_dm | ( | cb_to_cs & | c, |
example & | ec, | ||
COST_SENSITIVE::label & | cs_ld | ||
) |
Definition at line 53 of file gen_cs_example.h.
References CB::cb_class::action, GEN_CS::cb_to_cs::avg_loss_regressors, polylabel::cb, CB::cb_class::cost, CB::label::costs, COST_SENSITIVE::label::costs, GEN_CS::cb_to_cs::known_cost, example::l, GEN_CS::cb_to_cs::last_correct_cost, GEN_CS::cb_to_cs::last_pred_reg, polyprediction::multiclass, GEN_CS::cb_to_cs::nb_ex_regressors, GEN_CS::cb_to_cs::num_actions, example::pred, GEN_CS::cb_to_cs::pred_scores, GEN_CS::cb_to_cs::scorer, and COST_SENSITIVE::wclass::x.
void GEN_CS::gen_cs_example_dm | ( | multi_ex & | examples, |
COST_SENSITIVE::label & | cs_labels | ||
) |
Definition at line 60 of file gen_cs_example.cc.
References CB::label::costs, COST_SENSITIVE::label::costs, and COST_SENSITIVE::wclass::x.
Referenced by gen_cs_example(), and CB_ADF::cb_adf::learn_DM().
void GEN_CS::gen_cs_example_dr | ( | cb_to_cs & | c, |
example & | ec, | ||
CB::label & | ld, | ||
COST_SENSITIVE::label & | cs_ld, | ||
float | = 0.f |
||
) |
Definition at line 147 of file gen_cs_example.h.
References c, CB::label::costs, COST_SENSITIVE::label::costs, GEN_CS::cb_to_cs::num_actions, and GEN_CS::cb_to_cs::pred_scores.
void GEN_CS::gen_cs_example_dr | ( | cb_to_cs_adf & | c, |
multi_ex & | examples, | ||
COST_SENSITIVE::label & | cs_labels, | ||
float | clip_p = 0.f |
||
) |
Definition at line 197 of file gen_cs_example.h.
References CB::cb_class::action, CB::cb_class::cost, COST_SENSITIVE::label::costs, CB_ALGS::example_is_newline_not_header(), GEN_CS::cb_to_cs_adf::known_cost, GEN_CS::cb_to_cs_adf::pred_scores, CB::cb_class::probability, GEN_CS::cb_to_cs_adf::scorer, and COST_SENSITIVE::wclass::x.
void GEN_CS::gen_cs_example_ips | ( | multi_ex & | examples, |
COST_SENSITIVE::label & | cs_labels, | ||
float | clip_p | ||
) |
Definition at line 45 of file gen_cs_example.cc.
References CB::label::costs, COST_SENSITIVE::label::costs, safe_probability(), and COST_SENSITIVE::wclass::x.
Referenced by gen_cs_example(), CB_ADF::cb_adf::learn_IPS(), CB_ADF::cb_adf::learn_MTR(), and VW::cb_explore_adf::cover::cb_explore_adf_cover::predict_or_learn_impl().
void GEN_CS::gen_cs_example_ips | ( | cb_to_cs & | c, |
CB::label & | ld, | ||
COST_SENSITIVE::label & | cs_ld, | ||
float | clip_p | ||
) |
Definition at line 86 of file gen_cs_example.cc.
References CB::cb_class::action, GEN_CS::cb_to_cs::avg_loss_regressors, CB::cb_class::cost, CB::label::costs, COST_SENSITIVE::label::costs, GEN_CS::cb_to_cs::known_cost, GEN_CS::cb_to_cs::last_correct_cost, GEN_CS::cb_to_cs::last_pred_reg, GEN_CS::cb_to_cs::nb_ex_regressors, GEN_CS::cb_to_cs::num_actions, CB::cb_class::probability, safe_probability(), and COST_SENSITIVE::wclass::x.
void GEN_CS::gen_cs_example_mtr | ( | cb_to_cs_adf & | c, |
multi_ex & | ec_seq, | ||
COST_SENSITIVE::label & | cs_labels | ||
) |
Definition at line 140 of file gen_cs_example.cc.
References GEN_CS::cb_to_cs_adf::action_sum, CB::label::costs, COST_SENSITIVE::label::costs, GEN_CS::cb_to_cs_adf::event_sum, GEN_CS::cb_to_cs_adf::mtr_ec_seq, GEN_CS::cb_to_cs_adf::mtr_example, and COST_SENSITIVE::wclass::x.
Referenced by gen_cs_example(), and CB_ADF::cb_adf::learn_MTR().
void GEN_CS::gen_cs_example_sm | ( | multi_ex & | , |
uint32_t | chosen_action, | ||
float | sign_offset, | ||
ACTION_SCORE::action_scores | action_vals, | ||
COST_SENSITIVE::label & | cs_labels | ||
) |
Definition at line 163 of file gen_cs_example.cc.
References COST_SENSITIVE::label::costs, v_array< T >::size(), and COST_SENSITIVE::wclass::x.
Referenced by gen_cs_example(), and CB_ADF::cb_adf::learn_SM().
void GEN_CS::gen_cs_label | ( | cb_to_cs & | c, |
example & | ec, | ||
COST_SENSITIVE::label & | cs_ld, | ||
uint32_t | action, | ||
float | clip_p = 0.f |
||
) |
Definition at line 124 of file gen_cs_example.h.
References CB::cb_class::action, GEN_CS::cb_to_cs::avg_loss_regressors, CB::cb_class::cost, COST_SENSITIVE::label::costs, GEN_CS::cb_to_cs::known_cost, GEN_CS::cb_to_cs::last_correct_cost, GEN_CS::cb_to_cs::last_pred_reg, GEN_CS::cb_to_cs::nb_ex_regressors, GEN_CS::cb_to_cs::num_actions, GEN_CS::cb_to_cs::pred_scores, CB::cb_class::probability, GEN_CS::cb_to_cs::scorer, and COST_SENSITIVE::wclass::x.
void GEN_CS::gen_cs_test_example | ( | multi_ex & | examples, |
COST_SENSITIVE::label & | cs_labels | ||
) |
Definition at line 75 of file gen_cs_example.cc.
References COST_SENSITIVE::label::costs.
Referenced by CB_ADF::cb_adf::do_actual_learning(), gen_cs_example(), and CB_ADF::cb_adf::learn_SM().
CB::cb_class * GEN_CS::get_observed_cost | ( | CB::label & | ld | ) |
|
inline |
Definition at line 19 of file gen_cs_example.cc.
References CB::cb_class::cost, and CB::cb_class::probability.
Referenced by get_observed_cost().
float GEN_CS::safe_probability | ( | float | prob | ) |
Definition at line 33 of file gen_cs_example.cc.
References f, and prediction_type::prob.
Referenced by gen_cs_example_ips(), and CB_ADF::cb_adf::learn_SM().