Vowpal Wabbit
|
#include <cerrno>
#include "reductions.h"
#include "rand48.h"
#include <cfloat>
#include "vw.h"
#include "active.h"
#include "vw_exception.h"
Go to the source code of this file.
Functions | |
float | get_active_coin_bias (float k, float avg_loss, float g, float c0) |
float | query_decision (active &a, float ec_revert_weight, float k) |
template<bool is_learn> | |
void | predict_or_learn_simulation (active &a, single_learner &base, example &ec) |
template<bool is_learn> | |
void | predict_or_learn_active (active &a, single_learner &base, example &ec) |
void | active_print_result (int f, float res, float weight, v_array< char > tag) |
void | output_and_account_example (vw &all, active &a, example &ec) |
void | return_active_example (vw &all, active &a, example &ec) |
base_learner * | active_setup (options_i &options, vw &all) |
void active_print_result | ( | int | f, |
float | res, | ||
float | weight, | ||
v_array< char > | tag | ||
) |
Definition at line 87 of file active.cc.
References print_tag(), and io_buf::write_file_or_socket().
Referenced by output_and_account_example().
base_learner* active_setup | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 133 of file active.cc.
References vw::active, VW::config::option_group_definition::add(), VW::config::options_i::add_and_parse(), LEARNER::as_singleline(), vw::get_random_state(), LEARNER::init_learner(), LEARNER::make_base(), VW::config::make_option(), return_active_example(), LEARNER::learner< T, E >::set_finish_example(), setup_base(), THROW, and VW::config::options_i::was_supplied().
Referenced by parse_reductions().
float get_active_coin_bias | ( | float | k, |
float | avg_loss, | ||
float | g, | ||
float | c0 | ||
) |
Definition at line 105 of file active.cc.
References active_print_result(), example::confidence, vw::final_prediction_sink, example::l, label_data::label, example::loss, example::num_features, example::partial_prediction, example::pred, vw::print, CB::print_update(), query_decision(), vw::raw_prediction, polyprediction::scalar, vw::sd, polylabel::simple, example::tag, example::test_only, shared_data::update(), example::weight, shared_data::weighted_labels, and shared_data::weighted_unlabeled_examples.
Referenced by finish_example(), keep_example(), return_active_example(), return_example(), and no_label::return_no_label_example().
void predict_or_learn_active | ( | active & | a, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 73 of file active.cc.
References active::all, example::confidence, f, example::l, label_data::label, LEARNER::learner< T, E >::learn(), shared_data::max_label, shared_data::min_label, example::pred, LEARNER::learner< T, E >::predict(), polyprediction::scalar, vw::sd, LEARNER::learner< T, E >::sensitivity(), and polylabel::simple.
void predict_or_learn_simulation | ( | active & | a, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 44 of file active.cc.
References active::all, example::confidence, example::l, label_data::label, LEARNER::learner< T, E >::learn(), example::pred, LEARNER::learner< T, E >::predict(), shared_data::queries, query_decision(), polyprediction::scalar, vw::sd, LEARNER::learner< T, E >::sensitivity(), polylabel::simple, shared_data::t, and example::weight.
float query_decision | ( | active & | a, |
float | ec_revert_weight, | ||
float | k | ||
) |
Definition at line 26 of file active.cc.
References active::_random_state, active::active_c0, active::all, bias, f, get_active_coin_bias(), vw::sd, shared_data::sum_loss, and shared_data::weighted_labeled_examples.
Referenced by output_and_account_example(), and predict_or_learn_simulation().
Definition at line 127 of file active.cc.
References VW::finish_example(), and output_and_account_example().
Referenced by active_setup().