Vowpal Wabbit
|
#include <float.h>
#include <limits.h>
#include <math.h>
#include "correctedMath.h"
#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <memory>
#include "reductions.h"
#include "vw.h"
#include "rand48.h"
Go to the source code of this file.
Classes | |
struct | boosting |
Functions | |
float | sign (float w) |
int64_t | choose (int64_t n, int64_t k) |
template<bool is_learn> | |
void | predict_or_learn (boosting &o, LEARNER::single_learner &base, example &ec) |
template<bool is_learn> | |
void | predict_or_learn_logistic (boosting &o, LEARNER::single_learner &base, example &ec) |
template<bool is_learn> | |
void | predict_or_learn_adaptive (boosting &o, LEARNER::single_learner &base, example &ec) |
void | save_load_sampling (boosting &o, io_buf &model_file, bool read, bool text) |
void | return_example (vw &all, boosting &, example &ec) |
void | save_load (boosting &o, io_buf &model_file, bool read, bool text) |
LEARNER::base_learner * | boosting_setup (options_i &options, vw &all) |
LEARNER::base_learner* boosting_setup | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 396 of file boosting.cc.
References add(), VW::config::options_i::add_and_parse(), LEARNER::as_singleline(), f, vw::get_random_state(), LEARNER::make_base(), VW::config::make_option(), vw::quiet, return_example(), save_load(), save_load_sampling(), LEARNER::learner< T, E >::set_save_load(), setup_base(), THROW, and VW::config::options_i::was_supplied().
Referenced by parse_reductions().
int64_t choose | ( | int64_t | n, |
int64_t | k | ||
) |
Definition at line 41 of file boosting.cc.
Referenced by predict_or_learn().
void predict_or_learn | ( | boosting & | o, |
LEARNER::single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 77 of file boosting.cc.
References c, boosting::C, choose(), boosting::gamma, example::l, label_data::label, LEARNER::learner< T, E >::learn(), example::loss, boosting::N, example::partial_prediction, example::pred, LEARNER::learner< T, E >::predict(), polyprediction::scalar, sign(), polylabel::simple, boosting::t, and example::weight.
void predict_or_learn_adaptive | ( | boosting & | o, |
LEARNER::single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 203 of file boosting.cc.
References boosting::_random_state, boosting::alpha, correctedExp, example::l, label_data::label, LEARNER::learner< T, E >::learn(), example::loss, boosting::N, example::partial_prediction, example::pred, LEARNER::learner< T, E >::predict(), polyprediction::scalar, sign(), polylabel::simple, boosting::t, boosting::v, and example::weight.
void predict_or_learn_logistic | ( | boosting & | o, |
LEARNER::single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 145 of file boosting.cc.
References boosting::alpha, correctedExp, example::l, label_data::label, LEARNER::learner< T, E >::learn(), example::loss, boosting::N, example::partial_prediction, example::pred, LEARNER::learner< T, E >::predict(), polyprediction::scalar, sign(), polylabel::simple, boosting::t, and example::weight.
Definition at line 353 of file boosting.cc.
References VW::finish_example(), and output_and_account_example().
Referenced by boosting_setup().
Definition at line 359 of file boosting.cc.
References boosting::all, boosting::alpha, io_buf::bin_read_fixed(), bin_text_read_write_fixed(), bin_text_write_fixed(), f, io_buf::files, boosting::N, vw::quiet, vw::sd, v_array< T >::size(), and shared_data::weighted_examples().
Referenced by boosting_setup().
Definition at line 295 of file boosting.cc.
References boosting::all, boosting::alpha, io_buf::bin_read_fixed(), bin_text_read_write_fixed(), bin_text_write_fixed(), f, io_buf::files, boosting::N, vw::sd, v_array< T >::size(), boosting::v, shared_data::weighted_labeled_examples, and shared_data::weighted_unlabeled_examples.
Referenced by boosting_setup().
|
inline |
Definition at line 33 of file boosting.cc.
Referenced by predict_or_learn(), predict_or_learn_adaptive(), and predict_or_learn_logistic().