Vowpal Wabbit
|
#include <cmath>
#include <errno.h>
#include "reductions.h"
#include "v_hashmap.h"
#include "rand48.h"
#include "float.h"
#include "vw.h"
#include "vw_exception.h"
#include "csoaa.h"
Go to the source code of this file.
Classes | |
struct | lq_data |
struct | cs_active |
Macros | |
#define | B_SEARCH_MAX_ITER 20 |
Functions | |
float | binarySearch (float fhat, float delta, float sens, float tol) |
template<bool is_learn, bool is_simulation> | |
void | inner_loop (cs_active &cs_a, single_learner &base, example &ec, uint32_t i, float cost, uint32_t &prediction, float &score, float &partial_prediction, bool query_this_label, bool &query_needed) |
void | find_cost_range (cs_active &cs_a, single_learner &base, example &ec, uint32_t i, float delta, float eta, float &min_pred, float &max_pred, bool &is_range_large) |
template<bool is_learn, bool is_simulation> | |
void | predict_or_learn (cs_active &cs_a, single_learner &base, example &ec) |
void | finish_example (vw &all, cs_active &cs_a, example &ec) |
base_learner * | cs_active_setup (options_i &options, vw &all) |
#define B_SEARCH_MAX_ITER 20 |
Definition at line 11 of file cs_active.cc.
Referenced by binarySearch().
float binarySearch | ( | float | fhat, |
float | delta, | ||
float | sens, | ||
float | tol | ||
) |
Definition at line 65 of file cs_active.cc.
References B_SEARCH_MAX_ITER, and f.
Referenced by find_cost_range().
base_learner* cs_active_setup | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 310 of file cs_active.cc.
References VW::config::option_group_definition::add(), add(), VW::config::options_i::add_and_parse(), LEARNER::as_singleline(), vw::cost_sensitive, COST_SENSITIVE::cs_label, f, finish_example(), loss_function::getType(), LEARNER::init_learner(), vw::loss, parser::lp, LEARNER::make_base(), VW::config::make_option(), prediction_type::multilabels, vw::p, vw::sd, LEARNER::learner< T, E >::set_finish_example(), vw::set_minmax, setup_base(), THROW, vw::trace_message, and VW::config::options_i::was_supplied().
Referenced by parse_reductions().
|
inline |
Definition at line 144 of file cs_active.cc.
References binarySearch(), cs_active::cost_max, cs_active::cost_min, f, example::partial_prediction, example::pred, LEARNER::learner< T, E >::predict(), cs_active::print_debug_stuff, polyprediction::scalar, LEARNER::learner< T, E >::sensitivity(), and cs_active::t.
Referenced by predict_or_learn().
Definition at line 308 of file cs_active.cc.
References CSOAA::finish_example().
Referenced by cs_active_setup().
|
inline |
Definition at line 90 of file cs_active.cc.
References add_passthrough_feature, cs_active::all, cs_active::cost_max, cs_active::cost_min, example::l, label_data::label, LEARNER::learner< T, E >::learn(), example::partial_prediction, LEARNER::learner< T, E >::predict(), shared_data::queries, vw::sd, polylabel::simple, label_data::weight, and example::weight.
void predict_or_learn | ( | cs_active & | cs_a, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 176 of file cs_active.cc.
References cs_active::all, cs_active::c0, cs_active::c1, lq_data::cl, COST_SENSITIVE::wclass::class_index, cs_active::cost_max, cs_active::cost_min, COST_SENSITIVE::label::costs, polylabel::cs, v_array< T >::delete_v(), cs_active::distance_to_range, example::example_counter, cs_active::examples_by_queries, f, vw::final_regressor_name, find_cost_range(), cs_active::is_baseline, lq_data::is_range_large, lq_data::is_range_overlapped, example::l, cs_active::labels_outside_range, cs_active::max_labels, lq_data::max_pred, cs_active::min_labels, lq_data::min_pred, polyprediction::multiclass, cs_active::num_any_queries, cs_active::num_classes, cs_active::overlapped_and_range_small, COST_SENSITIVE::wclass::partial_prediction, example::partial_prediction, example::pred, v_array< T >::push_back(), shared_data::queries, cs_active::query_data, lq_data::query_needed, cs_active::range, VW::save_predictor(), vw::sd, polylabel::simple, v_array< T >::size(), cs_active::t, cs_active::use_domination, and COST_SENSITIVE::wclass::x.