Vowpal Wabbit
|
#include <cfloat>
#include <cmath>
#include <cerrno>
#include <sstream>
#include <numeric>
#include <vector>
#include <memory>
#include "reductions.h"
#include "rand48.h"
#include "vw.h"
#include "bs.h"
#include "vw_exception.h"
Go to the source code of this file.
Classes | |
struct | bs |
Functions | |
void | bs_predict_mean (vw &all, example &ec, std::vector< double > &pred_vec) |
void | bs_predict_vote (example &ec, std::vector< double > &pred_vec) |
void | print_result (int f, float res, v_array< char > tag, float lb, float ub) |
void | output_example (vw &all, bs &d, example &ec) |
template<bool is_learn> | |
void | predict_or_learn (bs &d, single_learner &base, example &ec) |
void | finish_example (vw &all, bs &d, example &ec) |
base_learner * | bs_setup (options_i &options, vw &all) |
Definition at line 36 of file bs.cc.
References accumulate(), loss_function::getLoss(), example::l, label_data::label, example::loss, vw::loss, example::pred, polyprediction::scalar, vw::sd, polylabel::simple, and example::weight.
Referenced by predict_or_learn().
void bs_predict_vote | ( | example & | ec, |
std::vector< double > & | pred_vec | ||
) |
Definition at line 43 of file bs.cc.
References f, example::l, label_data::label, example::loss, example::pred, polyprediction::scalar, polylabel::simple, and example::weight.
Referenced by predict_or_learn().
base_learner* bs_setup | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 231 of file bs.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), LEARNER::as_singleline(), BS_TYPE_MEAN, BS_TYPE_VOTE, finish_example(), vw::get_random_state(), LEARNER::init_learner(), LEARNER::make_base(), VW::config::make_option(), LEARNER::learner< T, E >::set_finish_example(), setup_base(), and VW::config::options_i::was_supplied().
Referenced by parse_reductions().
Definition at line 225 of file bs.cc.
References VW::finish_example(), and output_example().
Referenced by bs_setup().
Definition at line 151 of file bs.cc.
References v_array< T >::empty(), vw::final_prediction_sink, example::l, label_data::label, bs::lb, example::loss, example::num_features, example::pred, bs::pred_vec, print_result(), CB::print_update(), polyprediction::scalar, vw::sd, polylabel::simple, example::tag, example::test_only, bs::ub, shared_data::update(), example::weight, and shared_data::weighted_labels.
Referenced by finish_example().
void predict_or_learn | ( | bs & | d, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 178 of file bs.cc.
References bs::_random_state, bs::all, bs::B, bs_predict_mean(), bs_predict_vote(), bs::bs_type, BS_TYPE_MEAN, BS_TYPE_VOTE, LEARNER::learner< T, E >::learn(), example::partial_prediction, example::pred, bs::pred_vec, LEARNER::learner< T, E >::predict(), vw::print_text, vw::raw_prediction, polyprediction::scalar, example::tag, THROW, example::weight, and BS::weight_gen().
void print_result | ( | int | f, |
float | res, | ||
v_array< char > | tag, | ||
float | lb, | ||
float | ub | ||
) |
Definition at line 136 of file bs.cc.
References print_tag(), and io_buf::write_file_or_socket().
Referenced by enable_sources(), mf_print_audit_features(), output_example(), GD::print_audit_features(), and reset_source().