Vowpal Wabbit
Classes | Functions
GD Namespace Reference

Classes

struct  multipredict_info
 

Functions

VW::LEARNER::base_learnersetup (VW::setup_base_i &stack_builder)
 
float finalize_prediction (shared_data *sd, VW::io::logger &logger, float ret)
 
void print_features (VW::workspace &all, example &ec)
 
void print_audit_features (VW::workspace &, example &ec)
 
void save_load_regressor (VW::workspace &all, io_buf &model_file, bool read, bool text)
 
void save_load_online_state (VW::workspace &all, io_buf &model_file, bool read, bool text, double &total_weight, GD::gd *g=nullptr, uint32_t ftrl_size=0)
 
template<class T >
void vec_add_multipredict (multipredict_info< T > &mp, const float fx, uint64_t fi)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT>
void foreach_feature (VW::workspace &all, example &ec, DataT &dat)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT>
void foreach_feature (VW::workspace &all, example &ec, DataT &dat, size_t &num_interacted_features)
 
template<class DataT , void(*)(DataT &, float, float &) FuncT>
void foreach_feature (VW::workspace &all, example &ec, DataT &dat)
 
template<class DataT , void(*)(DataT &, float, float &) FuncT>
void foreach_feature (VW::workspace &all, example &ec, DataT &dat, size_t &num_interacted_features)
 
float inline_predict (VW::workspace &all, example &ec)
 
float inline_predict (VW::workspace &all, example &ec, size_t &num_generated_features)
 
float trunc_weight (const float w, const float gravity)
 
template<class DataT , void(*)(DataT &, float feature_value, uint64_t feature_index) FuncT, class WeightsT >
void foreach_feature (WeightsT &, const features &fs, DataT &dat, uint64_t offset=0, float mult=1.)
 
template<class DataT , void(*)(DataT &, float, float) FuncT, class WeightsT >
void foreach_feature (const WeightsT &weights, const features &fs, DataT &dat, uint64_t offset=0, float mult=1.)
 
template<class DataT >
void dummy_func (DataT &, const audit_strings *)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, class WeightsT >
void generate_interactions (const std::vector< std::vector< namespace_index >> &interactions, const std::vector< std::vector< extent_term >> &extent_interactions, bool permutations, example_predict &ec, DataT &dat, WeightsT &weights, size_t &num_interacted_features, INTERACTIONS::generate_interactions_object_cache &cache)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, class WeightsT >
void foreach_feature (WeightsT &weights, bool ignore_some_linear, std::array< bool, NUM_NAMESPACES > &ignore_linear, const std::vector< std::vector< namespace_index >> &interactions, const std::vector< std::vector< extent_term >> &extent_interactions, bool permutations, example_predict &ec, DataT &dat, size_t &num_interacted_features, INTERACTIONS::generate_interactions_object_cache &cache)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, class WeightsT >
void foreach_feature (WeightsT &weights, bool ignore_some_linear, std::array< bool, NUM_NAMESPACES > &ignore_linear, const std::vector< std::vector< namespace_index >> &interactions, const std::vector< std::vector< extent_term >> &extent_interactions, bool permutations, example_predict &ec, DataT &dat, INTERACTIONS::generate_interactions_object_cache &cache)
 
void vec_add (float &p, float fx, float fw)
 
template<class WeightsT >
float inline_predict (WeightsT &weights, bool ignore_some_linear, std::array< bool, NUM_NAMESPACES > &ignore_linear, const std::vector< std::vector< namespace_index >> &interactions, const std::vector< std::vector< extent_term >> &extent_interactions, bool permutations, example_predict &ec, INTERACTIONS::generate_interactions_object_cache &cache, float initial=0.f)
 
template<class WeightsT >
float inline_predict (WeightsT &weights, bool ignore_some_linear, std::array< bool, NUM_NAMESPACES > &ignore_linear, const std::vector< std::vector< namespace_index >> &interactions, const std::vector< std::vector< extent_term >> &extent_interactions, bool permutations, example_predict &ec, size_t &num_interacted_features, INTERACTIONS::generate_interactions_object_cache &cache, float initial=0.f)
 

Function Documentation

◆ dummy_func()

template<class DataT >
void GD::dummy_func ( DataT &  ,
const audit_strings  
)
inline

◆ finalize_prediction()

float GD::finalize_prediction ( shared_data sd,
VW::io::logger logger,
float  ret 
)

◆ foreach_feature() [1/8]

template<class DataT , void(*)(DataT &, float feature_value, uint64_t feature_index) FuncT, class WeightsT >
void GD::foreach_feature ( WeightsT &  weights,
const features fs,
DataT &  dat,
uint64_t  offset = 0,
float  mult = 1. 
)
inline

◆ foreach_feature() [2/8]

template<class DataT , void(*)(DataT &, float, float) FuncT, class WeightsT >
void GD::foreach_feature ( const WeightsT &  weights,
const features fs,
DataT &  dat,
uint64_t  offset = 0,
float  mult = 1. 
)
inline

◆ foreach_feature() [3/8]

template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, class WeightsT >
void GD::foreach_feature ( WeightsT &  weights,
bool  ignore_some_linear,
std::array< bool, NUM_NAMESPACES > &  ignore_linear,
const std::vector< std::vector< namespace_index >> &  interactions,
const std::vector< std::vector< extent_term >> &  extent_interactions,
bool  permutations,
example_predict ec,
DataT &  dat,
size_t &  num_interacted_features,
INTERACTIONS::generate_interactions_object_cache cache 
)
inline

◆ foreach_feature() [4/8]

template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT>
void GD::foreach_feature ( VW::workspace all,
example ec,
DataT &  dat 
)
inline

◆ foreach_feature() [5/8]

template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT>
void GD::foreach_feature ( VW::workspace all,
example ec,
DataT &  dat,
size_t &  num_interacted_features 
)
inline

◆ foreach_feature() [6/8]

template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, class WeightsT >
void GD::foreach_feature ( WeightsT &  weights,
bool  ignore_some_linear,
std::array< bool, NUM_NAMESPACES > &  ignore_linear,
const std::vector< std::vector< namespace_index >> &  interactions,
const std::vector< std::vector< extent_term >> &  extent_interactions,
bool  permutations,
example_predict ec,
DataT &  dat,
INTERACTIONS::generate_interactions_object_cache cache 
)
inline

◆ foreach_feature() [7/8]

template<class DataT , void(*)(DataT &, float, float &) FuncT>
void GD::foreach_feature ( VW::workspace all,
example ec,
DataT &  dat 
)
inline

◆ foreach_feature() [8/8]

template<class DataT , void(*)(DataT &, float, float &) FuncT>
void GD::foreach_feature ( VW::workspace all,
example ec,
DataT &  dat,
size_t &  num_interacted_features 
)
inline

◆ generate_interactions()

template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, class WeightsT >
void GD::generate_interactions ( const std::vector< std::vector< namespace_index >> &  interactions,
const std::vector< std::vector< extent_term >> &  extent_interactions,
bool  permutations,
example_predict ec,
DataT &  dat,
WeightsT &  weights,
size_t &  num_interacted_features,
INTERACTIONS::generate_interactions_object_cache cache 
)
inline

◆ inline_predict() [1/4]

template<class WeightsT >
float GD::inline_predict ( WeightsT &  weights,
bool  ignore_some_linear,
std::array< bool, NUM_NAMESPACES > &  ignore_linear,
const std::vector< std::vector< namespace_index >> &  interactions,
const std::vector< std::vector< extent_term >> &  extent_interactions,
bool  permutations,
example_predict ec,
INTERACTIONS::generate_interactions_object_cache cache,
float  initial = 0.f 
)
inline

◆ inline_predict() [2/4]

template<class WeightsT >
float GD::inline_predict ( WeightsT &  weights,
bool  ignore_some_linear,
std::array< bool, NUM_NAMESPACES > &  ignore_linear,
const std::vector< std::vector< namespace_index >> &  interactions,
const std::vector< std::vector< extent_term >> &  extent_interactions,
bool  permutations,
example_predict ec,
size_t &  num_interacted_features,
INTERACTIONS::generate_interactions_object_cache cache,
float  initial = 0.f 
)
inline

◆ inline_predict() [3/4]

float GD::inline_predict ( VW::workspace all,
example ec 
)
inline

◆ inline_predict() [4/4]

float GD::inline_predict ( VW::workspace all,
example ec,
size_t &  num_generated_features 
)
inline

◆ print_audit_features()

void GD::print_audit_features ( VW::workspace ,
example ec 
)

◆ print_features()

void GD::print_features ( VW::workspace all,
example ec 
)

◆ save_load_online_state()

void GD::save_load_online_state ( VW::workspace all,
io_buf model_file,
bool  read,
bool  text,
double &  total_weight,
GD::gd *  g = nullptr,
uint32_t  ftrl_size = 0 
)

◆ save_load_regressor()

void GD::save_load_regressor ( VW::workspace all,
io_buf model_file,
bool  read,
bool  text 
)

◆ setup()

VW::LEARNER::base_learner* GD::setup ( VW::setup_base_i stack_builder)

◆ trunc_weight()

float GD::trunc_weight ( const float  w,
const float  gravity 
)
inline

◆ vec_add()

void GD::vec_add ( float &  p,
float  fx,
float  fw 
)
inline

◆ vec_add_multipredict()

template<class T >
void GD::vec_add_multipredict ( multipredict_info< T > &  mp,
const float  fx,
uint64_t  fi 
)
inline