Vowpal Wabbit
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
learner.h File Reference
#include <iostream>
#include <memory>
#include "memory.h"
#include "multiclass.h"
#include "simple_label.h"
#include "parser.h"
#include "debug_log.h"
#include "future_compat.h"
#include "example.h"
#include "scope_exit.h"
#include "metric_sink.h"

Classes

struct  VW::LEARNER::learner< T, E >
 Defines the interface for a learning algorithm. More...
 
struct  VW::LEARNER::func_data
 
struct  VW::LEARNER::learn_data
 
struct  VW::LEARNER::sensitivity_data
 
struct  VW::LEARNER::save_load_data
 
struct  VW::LEARNER::save_metric_data
 
struct  VW::LEARNER::finish_example_data
 
struct  VW::LEARNER::learner< T, E >
 Defines the interface for a learning algorithm. More...
 
struct  VW::LEARNER::common_learner_builder< FluentBuilderT, DataT, ExampleT, BaseLearnerT >
 
struct  VW::LEARNER::reduction_learner_builder< DataT, ExampleT, BaseLearnerT >
 
struct  VW::LEARNER::reduction_no_data_learner_builder< ExampleT, BaseLearnerT >
 
struct  VW::LEARNER::base_learner_builder< DataT, ExampleT >
 

Namespaces

 VW
 
 VW::LEARNER
 Contains the VW::LEARNER::learner object and utilities for interacting with it.
 

Macros

#define VW_DEBUG_LOG   vw_dbg::learner
 

Typedefs

using VW::LEARNER::base_learner = learner< char, char >
 Used to type erase the object and pass around common type. More...
 
using VW::LEARNER::single_learner = learner< char, example >
 Used for reductions that process single example objects at at time. It type erases the specific reduction object type. More...
 
using VW::LEARNER::multi_learner = learner< char, multi_ex >
 Used for multiline examples where there are several example objects required to describe the overall example. It type erases the specific reduction object type. More...
 

Enumerations

enum  prediction_type_t {
  prediction_type_t::scalar, prediction_type_t::scalars, prediction_type_t::action_scores, prediction_type_t::pdf,
  prediction_type_t::action_probs, prediction_type_t::multiclass, prediction_type_t::multilabels, prediction_type_t::prob,
  prediction_type_t::multiclassprobs, prediction_type_t::decision_probs, prediction_type_t::action_pdf_value, prediction_type_t::active_multiclass
}
 

Functions

const char * to_string (prediction_type_t prediction_type)
 
func_data VW::LEARNER::tuple_dbf (void *data, base_learner *base, void(*func)(void *))
 
void VW::LEARNER::generic_driver (vw &all)
 
void VW::LEARNER::generic_driver (const std::vector< vw * > &alls)
 
void VW::LEARNER::generic_driver_onethread (vw &all)
 
void VW::LEARNER::noop_save_load (void *, io_buf &, bool, bool)
 
void VW::LEARNER::noop_persist_metrics (void *, metric_sink &)
 
void VW::LEARNER::noop (void *)
 
float VW::LEARNER::noop_sensitivity (void *, base_learner &, example &)
 
float VW::LEARNER::recur_sensitivity (void *, base_learner &, example &)
 
void VW::LEARNER::debug_increment_depth (example &ex)
 
void VW::LEARNER::debug_increment_depth (multi_ex &ec_seq)
 
void VW::LEARNER::debug_decrement_depth (example &ex)
 
void VW::LEARNER::debug_decrement_depth (multi_ex &ec_seq)
 
void VW::LEARNER::increment_offset (example &ex, const size_t increment, const size_t i)
 
void VW::LEARNER::increment_offset (multi_ex &ec_seq, const size_t increment, const size_t i)
 
void VW::LEARNER::decrement_offset (example &ex, const size_t increment, const size_t i)
 
void VW::LEARNER::decrement_offset (multi_ex &ec_seq, const size_t increment, const size_t i)
 
bool VW::LEARNER::ec_is_example_header (example const &ec, label_type_t label_type)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t ws, prediction_type_t pred_type, const std::string &name, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (free_ptr< T > &dat, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t params_per_weight, const std::string &name, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (void(*predict)(T &, L &, E &), size_t params_per_weight, const std::string &name)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (free_ptr< T > &dat, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t params_per_weight, prediction_type_t pred_type, const std::string &name, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t ws, const std::string &name, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), const std::string &name, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_learner (L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), const std::string &name, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_multiclass_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), parser *p, size_t ws, const std::string &name, prediction_type_t pred_type=prediction_type_t::multiclass, bool learn_returns_prediction=false)
 
template<class T , class E , class L >
learner< T, E > & VW::LEARNER::init_cost_sensitive_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), parser *p, size_t ws, const std::string &name, prediction_type_t pred_type=prediction_type_t::multiclass, bool learn_returns_prediction=false)
 
template<class T , class E >
base_learner * VW::LEARNER::make_base (learner< T, E > &base)
 
template<class T , class E >
multi_learner * VW::LEARNER::as_multiline (learner< T, E > *l)
 
template<class T , class E >
single_learner * VW::LEARNER::as_singleline (learner< T, E > *l)
 
template<bool is_learn>
void VW::LEARNER::multiline_learn_or_predict (multi_learner &base, multi_ex &examples, const uint64_t offset, const uint32_t id=0)
 
float VW::LEARNER::noop_sensitivity_base (void *, example &)
 
template<class DataT , class ExampleT , class BaseLearnerT >
VW_WARNING_STATE_POP reduction_learner_builder< DataT, ExampleT, BaseLearnerT > VW::LEARNER::make_reduction_learner (std::unique_ptr< DataT > &&data, BaseLearnerT *base, void(*learn_fn)(DataT &, BaseLearnerT &, ExampleT &), void(*predict_fn)(DataT &, BaseLearnerT &, ExampleT &), const std::string &name)
 
template<class ExampleT , class BaseLearnerT >
reduction_no_data_learner_builder< ExampleT, BaseLearnerT > VW::LEARNER::make_no_data_reduction_learner (BaseLearnerT *base, void(*learn_fn)(char &, BaseLearnerT &, ExampleT &), void(*predict_fn)(char &, BaseLearnerT &, ExampleT &), const std::string &name)
 
template<class DataT , class ExampleT >
base_learner_builder< DataT, ExampleT > VW::LEARNER::make_base_learner (std::unique_ptr< DataT > &&data, void(*learn_fn)(DataT &, base_learner &, ExampleT &), void(*predict_fn)(DataT &, base_learner &, ExampleT &), const std::string &name, prediction_type_t pred_type, label_type_t label_type)
 

Macro Definition Documentation

#define VW_DEBUG_LOG   vw_dbg::learner

Enumeration Type Documentation

enum prediction_type_t
strong
Enumerator
scalar 
scalars 
action_scores 
pdf 
action_probs 
multiclass 
multilabels 
prob 
multiclassprobs 
decision_probs 
action_pdf_value 
active_multiclass 

Function Documentation

const char* to_string ( prediction_type_t  prediction_type)