Vowpal Wabbit
Classes | Typedefs | Functions
VW::LEARNER Namespace Reference

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

Classes

struct  finish_example_data
 
struct  func_data
 
struct  learn_data
 
struct  learner
 Defines the interface for a learning algorithm. More...
 
struct  save_load_data
 
struct  sensitivity_data
 

Typedefs

using base_learner = learner< char, char >
 Used to type erase the object and pass around common type. More...
 
using 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 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...
 

Functions

func_data tuple_dbf (void *data, base_learner *base, void(*func)(void *))
 
void generic_driver (vw &all)
 
void generic_driver (const std::vector< vw * > &alls)
 
void generic_driver_onethread (vw &all)
 
void noop_sl (void *, io_buf &, bool, bool)
 
void noop (void *)
 
float noop_sensitivity (void *, base_learner &, example &)
 
float recur_sensitivity (void *, base_learner &, example &)
 
void increment_offset (example &ex, const size_t increment, const size_t i)
 
void increment_offset (multi_ex &ec_seq, const size_t increment, const size_t i)
 
void decrement_offset (example &ex, const size_t increment, const size_t i)
 
void decrement_offset (multi_ex &ec_seq, const size_t increment, const size_t i)
 
template<class T , class E , class L >
learner< T, E > & 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)
 
template<class T , class E , class L >
learner< T, E > & init_learner (free_ptr< T > &dat, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t params_per_weight)
 
template<class T , class E , class L >
learner< T, E > & init_learner (void(*predict)(T &, L &, E &), size_t params_per_weight)
 
template<class T , class E , class L >
learner< T, E > & 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)
 
template<class T , class E , class L >
learner< T, E > & init_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t ws)
 
template<class T , class E , class L >
learner< T, E > & init_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &))
 
template<class T , class E , class L >
learner< T, E > & init_learner (L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &))
 
template<class T , class E , class L >
learner< T, E > & init_multiclass_learner (free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), parser *p, size_t ws, prediction_type_t pred_type=prediction_type_t::multiclass)
 
template<class T , class E , class L >
learner< T, E > & 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, prediction_type_t pred_type=prediction_type_t::multiclass)
 
template<class T , class E >
base_learnermake_base (learner< T, E > &base)
 
template<class T , class E >
multi_learneras_multiline (learner< T, E > *l)
 
template<class T , class E >
single_learneras_singleline (learner< T, E > *l)
 
template<bool is_learn>
void multiline_learn_or_predict (multi_learner &base, multi_ex &examples, const uint64_t offset, const uint32_t id=0)
 

Detailed Description

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

Typedef Documentation

typedef learner< char, char > VW::LEARNER::base_learner

Used to type erase the object and pass around common type.

Used for multiline examples where there are several example objects required to describe the overall example. It type erases the specific reduction object type.

Used for reductions that process single example objects at at time. It type erases the specific reduction object type.

Function Documentation

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)
void VW::LEARNER::decrement_offset ( example ex,
const size_t  increment,
const size_t  i 
)
inline
void VW::LEARNER::decrement_offset ( multi_ex ec_seq,
const size_t  increment,
const size_t  i 
)
inline
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::increment_offset ( example ex,
const size_t  increment,
const size_t  i 
)
inline
void VW::LEARNER::increment_offset ( multi_ex ec_seq,
const size_t  increment,
const size_t  i 
)
inline
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_cost_sensitive_learner ( free_ptr< T > &  dat,
L *  base,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict,
parser p,
size_t  ws,
prediction_type_t  pred_type = prediction_type_t::multiclass 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( free_ptr< T > &  dat,
L *  base,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict,
size_t  ws,
prediction_type_t  pred_type 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( free_ptr< T > &  dat,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict,
size_t  params_per_weight 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( void(*)(T &, L &, E &)  predict,
size_t  params_per_weight 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( free_ptr< T > &  dat,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict,
size_t  params_per_weight,
prediction_type_t  pred_type 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( free_ptr< T > &  dat,
L *  base,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict,
size_t  ws 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( free_ptr< T > &  dat,
L *  base,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_learner ( L *  base,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict 
)
template<class T , class E , class L >
learner<T, E>& VW::LEARNER::init_multiclass_learner ( free_ptr< T > &  dat,
L *  base,
void(*)(T &, L &, E &)  learn,
void(*)(T &, L &, E &)  predict,
parser p,
size_t  ws,
prediction_type_t  pred_type = prediction_type_t::multiclass 
)
template<class T , class E >
base_learner* VW::LEARNER::make_base ( learner< T, E > &  base)
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 
)
void VW::LEARNER::noop ( void *  )
inline
float VW::LEARNER::noop_sensitivity ( void *  ,
base_learner ,
example  
)
inline
void VW::LEARNER::noop_sl ( void *  ,
io_buf ,
bool  ,
bool   
)
inline
float VW::LEARNER::recur_sensitivity ( void *  ,
base_learner ,
example  
)
func_data VW::LEARNER::tuple_dbf ( void *  data,
base_learner base,
void(*)(void *)  func 
)
inline