Vowpal Wabbit
|
#include <sstream>
#include <cfloat>
#include <cmath>
#include "correctedMath.h"
#include "reductions.h"
#include "rand48.h"
#include "vw_exception.h"
#include "vw.h"
Go to the source code of this file.
Classes | |
struct | oaa |
Functions | |
void | learn_randomized (oaa &o, LEARNER::single_learner &base, example &ec) |
template<bool is_learn, bool print_all, bool scores, bool probabilities> | |
void | predict_or_learn (oaa &o, LEARNER::single_learner &base, example &ec) |
template<bool probabilities> | |
void | finish_example_scores (vw &all, oaa &o, example &ec) |
LEARNER::base_learner * | oaa_setup (options_i &options, vw &all) |
Definition at line 136 of file oaa.cc.
References substring::begin, substring::end, vw::final_prediction_sink, VW::finish_example(), namedlabels::get(), shared_data::holdout_multiclass_log_loss, oaa::k, example::l, MULTICLASS::label_t::label, shared_data::ldict, polylabel::multi, shared_data::multiclass_log_loss, example::num_features, example::pred, vw::print_text, MULTICLASS::print_update_with_probability(), MULTICLASS::print_update_with_score(), polyprediction::scalars, vw::sd, example::tag, example::test_only, shared_data::update(), and example::weight.
void learn_randomized | ( | oaa & | o, |
LEARNER::single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 33 of file oaa.cc.
References oaa::k, example::l, label_data::label, MULTICLASS::label_t::label, LEARNER::learner< T, E >::learn(), polylabel::multi, polyprediction::multiclass, oaa::num_subsample, example::partial_prediction, example::pred, polylabel::simple, oaa::subsample_id, oaa::subsample_order, and example::weight.
Referenced by oaa_setup().
LEARNER::base_learner* oaa_setup | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 203 of file oaa.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), LEARNER::as_singleline(), vw::delete_prediction, delete_scalars(), vw::get_random_state(), namedlabels::getK(), loss_function::getType(), LEARNER::init_multiclass_learner(), shared_data::ldict, learn_randomized(), vw::loss, LEARNER::make_base(), VW::config::make_option(), prediction_type::multiclass, oaa::num_subsample, vw::p, vw::raw_prediction, shared_data::report_multiclass_log_loss, prediction_type::scalars, vw::sd, LEARNER::learner< T, E >::set_finish_example(), LEARNER::learner< T, E >::set_learn(), setup_base(), THROW, vw::trace_message, and VW::config::options_i::was_supplied().
Referenced by parse_reductions().
void predict_or_learn | ( | oaa & | o, |
LEARNER::single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 72 of file oaa.cc.
References add_passthrough_feature, oaa::all, v_array< T >::clear(), correctedExp, f, oaa::k, example::l, MULTICLASS::label_t::label, polylabel::multi, polyprediction::multiclass, LEARNER::learner< T, E >::multipredict(), example::passthrough, oaa::pred, example::pred, vw::print_text, v_array< T >::push_back(), vw::raw_prediction, polyprediction::scalar, polyprediction::scalars, polylabel::simple, example::tag, and LEARNER::learner< T, E >::update().