Vowpal Wabbit
Classes | Typedefs | Functions | Variables
INTERACTIONS Namespace Reference

Classes

struct  feature_gen_data
 
struct  interactions_generator
 

Typedefs

using generate_func_t = std::vector< std::vector< namespace_index >>(const std::set< namespace_index > &namespaces, size_t num_to_pick)
 

Functions

template<class R , class S , void(*)(R &, float, S) T, bool audit, void(*)(R &, const audit_strings *) audit_func>
void generate_interactions (vw &all, example_predict &ec, R &dat, size_t &num_interacted_features)
 
template<class R , class S , void(*)(R &, float, S) T>
void generate_interactions (vw &all, example_predict &ec, R &dat, size_t &num_interacted_features)
 
VW::LEARNER::base_learnergenerate_interactions_setup (VW::config::options_i &options, vw &all)
 
constexpr bool is_printable_namespace (const unsigned char ns)
 
bool contains_wildcard (const std::vector< namespace_index > &interaction)
 
void eval_count_of_generated_ft (bool permutations, const std::vector< std::vector< namespace_index >> &interactions, const std::array< features, NUM_NAMESPACES > &feature_spaces, size_t &new_features_cnt, float &new_features_value)
 
std::vector< std::vector< namespace_index > > generate_namespace_combinations_with_repetition (const std::set< namespace_index > &namespaces, size_t num_to_pick)
 
std::vector< std::vector< namespace_index > > generate_namespace_permutations_with_repetition (const std::set< namespace_index > &namespaces, size_t num_to_pick)
 
std::vector< std::vector< namespace_index > > expand_quadratics_wildcard_interactions (bool leave_duplicate_interactions, const std::set< namespace_index > &new_example_indices)
 
bool sort_interactions_comparator (const std::vector< namespace_index > &a, const std::vector< namespace_index > &b)
 
void sort_and_filter_duplicate_interactions (std::vector< std::vector< namespace_index >> &vec, bool filter_duplicates, size_t &removed_cnt, size_t &sorted_cnt)
 
template<generate_func_t generate_func, bool leave_duplicate_interactions>
std::vector< std::vector< namespace_index > > compile_interaction (const std::vector< namespace_index > &interaction, const std::set< namespace_index > &indices)
 
template<generate_func_t generate_func, bool leave_duplicate_interactions>
std::vector< std::vector< namespace_index > > compile_interactions (const std::vector< std::vector< namespace_index >> &interactions, const std::set< namespace_index > &indices)
 
template<class DataT , void(*)(DataT &, const float, float &) FuncT, class WeightsT >
void call_FuncT (DataT &dat, WeightsT &weights, const float ft_value, const uint64_t ft_idx)
 
template<class DataT , void(*)(DataT &, const float, float) FuncT, class WeightsT >
void call_FuncT (DataT &dat, const WeightsT &weights, const float ft_value, const uint64_t ft_idx)
 
float INTERACTION_VALUE (float value1, float value2)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, bool audit, void(*)(DataT &, const audit_strings *) audit_func, class WeightsT >
void inner_kernel (DataT &dat, features::const_audit_iterator &begin, features::const_audit_iterator &end, const uint64_t offset, WeightsT &weights, feature_value ft_value, feature_index halfhash)
 
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, bool audit, void(*)(DataT &, const audit_strings *) audit_func, class WeightsT >
void generate_interactions (const std::vector< std::vector< namespace_index >> &interactions, bool permutations, example_predict &ec, DataT &dat, WeightsT &weights, size_t &num_features)
 

Variables

constexpr bool feature_self_interactions = true
 
constexpr unsigned char printable_start = ' '
 
constexpr unsigned char printable_end = '~'
 
constexpr unsigned char printable_ns_size = printable_end - printable_start
 
constexpr uint64_t valid_ns_size
 

Typedef Documentation

using INTERACTIONS::generate_func_t = typedef std::vector<std::vector<namespace_index>>( const std::set<namespace_index>& namespaces, size_t num_to_pick)

Function Documentation

template<class DataT , void(*)(DataT &, const float, float &) FuncT, class WeightsT >
void INTERACTIONS::call_FuncT ( DataT &  dat,
WeightsT &  weights,
const float  ft_value,
const uint64_t  ft_idx 
)
inline
template<class DataT , void(*)(DataT &, const float, float) FuncT, class WeightsT >
void INTERACTIONS::call_FuncT ( DataT &  dat,
const WeightsT &  weights,
const float  ft_value,
const uint64_t  ft_idx 
)
inline
template<generate_func_t generate_func, bool leave_duplicate_interactions>
std::vector<std::vector<namespace_index> > INTERACTIONS::compile_interaction ( const std::vector< namespace_index > &  interaction,
const std::set< namespace_index > &  indices 
)
template<generate_func_t generate_func, bool leave_duplicate_interactions>
std::vector<std::vector<namespace_index> > INTERACTIONS::compile_interactions ( const std::vector< std::vector< namespace_index >> &  interactions,
const std::set< namespace_index > &  indices 
)
bool INTERACTIONS::contains_wildcard ( const std::vector< namespace_index > &  interaction)
inline
void INTERACTIONS::eval_count_of_generated_ft ( bool  permutations,
const std::vector< std::vector< namespace_index >> &  interactions,
const std::array< features, NUM_NAMESPACES > &  feature_spaces,
size_t &  new_features_cnt,
float &  new_features_value 
)
std::vector<std::vector<namespace_index> > INTERACTIONS::expand_quadratics_wildcard_interactions ( bool  leave_duplicate_interactions,
const std::set< namespace_index > &  new_example_indices 
)
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, bool audit, void(*)(DataT &, const audit_strings *) audit_func, class WeightsT >
void INTERACTIONS::generate_interactions ( const std::vector< std::vector< namespace_index >> &  interactions,
bool  permutations,
example_predict ec,
DataT &  dat,
WeightsT &  weights,
size_t &  num_features 
)
inline
template<class R , class S , void(*)(R &, float, S) T, bool audit, void(*)(R &, const audit_strings *) audit_func>
void INTERACTIONS::generate_interactions ( vw all,
example_predict ec,
R &  dat,
size_t &  num_interacted_features 
)
inline
template<class R , class S , void(*)(R &, float, S) T>
void INTERACTIONS::generate_interactions ( vw all,
example_predict ec,
R &  dat,
size_t &  num_interacted_features 
)
inline
VW::LEARNER::base_learner* INTERACTIONS::generate_interactions_setup ( VW::config::options_i options,
vw all 
)
std::vector<std::vector<namespace_index> > INTERACTIONS::generate_namespace_combinations_with_repetition ( const std::set< namespace_index > &  namespaces,
size_t  num_to_pick 
)
std::vector<std::vector<namespace_index> > INTERACTIONS::generate_namespace_permutations_with_repetition ( const std::set< namespace_index > &  namespaces,
size_t  num_to_pick 
)
template<class DataT , class WeightOrIndexT , void(*)(DataT &, float, WeightOrIndexT) FuncT, bool audit, void(*)(DataT &, const audit_strings *) audit_func, class WeightsT >
void INTERACTIONS::inner_kernel ( DataT &  dat,
features::const_audit_iterator begin,
features::const_audit_iterator end,
const uint64_t  offset,
WeightsT &  weights,
feature_value  ft_value,
feature_index  halfhash 
)
inline
float INTERACTIONS::INTERACTION_VALUE ( float  value1,
float  value2 
)
inline
constexpr bool INTERACTIONS::is_printable_namespace ( const unsigned char  ns)
inline
void INTERACTIONS::sort_and_filter_duplicate_interactions ( std::vector< std::vector< namespace_index >> &  vec,
bool  filter_duplicates,
size_t &  removed_cnt,
size_t &  sorted_cnt 
)
bool INTERACTIONS::sort_interactions_comparator ( const std::vector< namespace_index > &  a,
const std::vector< namespace_index > &  b 
)

Variable Documentation

constexpr bool INTERACTIONS::feature_self_interactions = true
constexpr unsigned char INTERACTIONS::printable_end = '~'
constexpr unsigned char INTERACTIONS::printable_ns_size = printable_end - printable_start
constexpr unsigned char INTERACTIONS::printable_start = ' '
constexpr uint64_t INTERACTIONS::valid_ns_size
Initial value:
=
constexpr unsigned char printable_end
Definition: interactions.h:29
constexpr unsigned char printable_start
Definition: interactions.h:28