Vowpal Wabbit
|
Classes | |
struct | cb_explore |
Functions | |
template<bool is_learn> | |
void | predict_or_learn_first (cb_explore &data, single_learner &base, example &ec) |
template<bool is_learn> | |
void | predict_or_learn_greedy (cb_explore &data, single_learner &base, example &ec) |
template<bool is_learn> | |
void | predict_or_learn_bag (cb_explore &data, single_learner &base, example &ec) |
void | get_cover_probabilities (cb_explore &data, single_learner &, example &ec, v_array< action_score > &probs) |
template<bool is_learn> | |
void | predict_or_learn_cover (cb_explore &data, single_learner &base, example &ec) |
void | print_update_cb_explore (vw &all, bool is_test, example &ec, std::stringstream &pred_string) |
void | output_example (vw &all, cb_explore &data, example &ec, CB::label &ld) |
void | finish_example (vw &all, cb_explore &c, example &ec) |
void CB_EXPLORE::finish_example | ( | vw & | all, |
cb_explore & | c, | ||
example & | ec | ||
) |
Definition at line 266 of file cb_explore.cc.
References polylabel::cb, VW::finish_example(), example::l, and output_example().
Referenced by cb_explore_setup().
void CB_EXPLORE::get_cover_probabilities | ( | cb_explore & | data, |
single_learner & | , | ||
example & | ec, | ||
v_array< action_score > & | probs | ||
) |
Definition at line 125 of file cb_explore.cc.
References ACTION_SCORE::begin_scores(), CB_EXPLORE::cb_explore::cbcs, v_array< T >::clear(), CB_EXPLORE::cb_explore::counter, CB_EXPLORE::cb_explore::cover_size, CB_EXPLORE::cb_explore::cs, ACTION_SCORE::end_scores(), exploration::enforce_minimum_probability(), f, polyprediction::multiclass, GEN_CS::cb_to_cs::num_actions, example::pred, CB_EXPLORE::cb_explore::preds, and v_array< T >::push_back().
Referenced by predict_or_learn_cover().
void CB_EXPLORE::output_example | ( | vw & | all, |
cb_explore & | data, | ||
example & | ec, | ||
CB::label & | ld | ||
) |
Definition at line 235 of file cb_explore.cc.
References polyprediction::a_s, c, CB::cb_label, CB_EXPLORE::cb_explore::cbcs, f, vw::final_prediction_sink, CB_ALGS::get_cost_estimate(), CB_ADF::get_observed_cost(), GEN_CS::cb_to_cs::known_cost, loss(), example::num_features, example::pred, GEN_CS::cb_to_cs::pred_scores, vw::print_text, print_update_cb_explore(), vw::sd, v_array< T >::size(), example::tag, test_label(), example::test_only, and shared_data::update().
Referenced by finish_example().
void CB_EXPLORE::predict_or_learn_bag | ( | cb_explore & | data, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 101 of file cb_explore.cc.
References CB_EXPLORE::cb_explore::_random_state, polyprediction::a_s, CB_EXPLORE::cb_explore::bag_size, CB_EXPLORE::cb_explore::cbcs, v_array< T >::clear(), LEARNER::learner< T, E >::learn(), polyprediction::multiclass, GEN_CS::cb_to_cs::num_actions, example::pred, LEARNER::learner< T, E >::predict(), prediction_type::prob, v_array< T >::push_back(), and BS::weight_gen().
void CB_EXPLORE::predict_or_learn_cover | ( | cb_explore & | data, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 153 of file cb_explore.cc.
References polyprediction::a_s, polylabel::cb, CB_EXPLORE::cb_explore::cb_label, CB_EXPLORE::cb_explore::cbcs, v_array< T >::clear(), COST_SENSITIVE::label::costs, CB_EXPLORE::cb_explore::counter, CB_EXPLORE::cb_explore::cover_probs, CB_EXPLORE::cb_explore::cover_size, polylabel::cs, CB_EXPLORE::cb_explore::cs, CB_EXPLORE::cb_explore::cs_label, f, get_cover_probabilities(), CB_ADF::get_observed_cost(), GEN_CS::cb_to_cs::known_cost, example::l, LEARNER::learner< T, E >::learn(), GEN_CS::cb_to_cs::num_actions, example::pred, CB_EXPLORE::cb_explore::preds, CB_EXPLORE::cb_explore::psi, and CB_EXPLORE::cb_explore::second_cs_label.
void CB_EXPLORE::predict_or_learn_first | ( | cb_explore & | data, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 51 of file cb_explore.cc.
References polyprediction::a_s, polylabel::cb, CB_EXPLORE::cb_explore::cbcs, v_array< T >::clear(), CB::label::costs, example::l, LEARNER::learner< T, E >::learn(), polyprediction::multiclass, GEN_CS::cb_to_cs::num_actions, example::pred, LEARNER::learner< T, E >::predict(), prediction_type::prob, v_array< T >::push_back(), and CB_EXPLORE::cb_explore::tau.
void CB_EXPLORE::predict_or_learn_greedy | ( | cb_explore & | data, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 79 of file cb_explore.cc.
References polyprediction::a_s, ACTION_SCORE::begin_scores(), CB_EXPLORE::cb_explore::cbcs, v_array< T >::clear(), ACTION_SCORE::end_scores(), CB_EXPLORE::cb_explore::epsilon, exploration::generate_epsilon_greedy(), LEARNER::learner< T, E >::learn(), polyprediction::multiclass, GEN_CS::cb_to_cs::num_actions, example::pred, LEARNER::learner< T, E >::predict(), v_array< T >::push_back(), and v_array< T >::resize().
void CB_EXPLORE::print_update_cb_explore | ( | vw & | all, |
bool | is_test, | ||
example & | ec, | ||
std::stringstream & | pred_string | ||
) |
Definition at line 221 of file cb_explore.cc.
References vw::bfgs, polylabel::cb, CB::label::costs, vw::current_pass, shared_data::dump_interval, vw::holdout_set_off, example::l, example::num_features, shared_data::print_update(), vw::progress_add, vw::progress_arg, vw::quiet, vw::sd, and shared_data::weighted_examples().
Referenced by output_example().