Vowpal Wabbit
Classes | Namespaces | Typedefs | Functions | Variables
interactions.h File Reference
#include "example_predict.h"
#include "feature_group.h"
#include "reductions_fwd.h"
#include "constant.h"
#include <cstddef>
#include <limits>
#include <vector>
#include <set>
#include <algorithm>
#include "vw_math.h"

Classes

struct  INTERACTIONS::interactions_generator
 

Namespaces

 INTERACTIONS
 

Typedefs

template<typename T >
using INTERACTIONS::generate_func_t = std::vector< std::vector< T > >(const std::set< T > &namespaces, size_t num_to_pick)
 

Functions

VW::LEARNER::base_learnerINTERACTIONS::generate_interactions_setup (VW::config::options_i &options, VW::workspace &all)
 
constexpr bool INTERACTIONS::is_interaction_ns (const unsigned char ns)
 
bool INTERACTIONS::contains_wildcard (const std::vector< namespace_index > &interaction)
 
bool INTERACTIONS::contains_wildcard (const std::vector< extent_term > &interaction)
 
float INTERACTIONS::eval_sum_ft_squared_of_generated_ft (bool permutations, const std::vector< std::vector< namespace_index >> &interactions, const std::vector< std::vector< extent_term >> &extent_interactions, const std::array< features, NUM_NAMESPACES > &feature_spaces)
 
template<typename T >
std::vector< T > INTERACTIONS::indices_to_values_one_based (const std::vector< size_t > &indices, const std::set< T > &values)
 
template<typename T >
std::vector< T > INTERACTIONS::indices_to_values_ignore_last_index (const std::vector< size_t > &indices, const std::set< T > &values)
 
template<typename T >
bool INTERACTIONS::must_be_left_sorted (const std::vector< T > &oi)
 
template<typename T >
void INTERACTIONS::sort_and_filter_duplicate_interactions (std::vector< std::vector< T >> &vec, bool filter_duplicates, size_t &removed_cnt, size_t &sorted_cnt)
 
template<typename T >
std::vector< std::vector< T > > INTERACTIONS::generate_namespace_combinations_with_repetition (const std::set< T > &namespaces, size_t num_to_pick)
 
template<typename T >
std::vector< std::vector< T > > INTERACTIONS::generate_namespace_permutations_with_repetition (const std::set< T > &namespaces, size_t num_to_pick)
 
std::vector< std::vector< namespace_index > > INTERACTIONS::expand_quadratics_wildcard_interactions (bool leave_duplicate_interactions, const std::set< namespace_index > &new_example_indices)
 
bool INTERACTIONS::sort_interactions_comparator (const std::vector< namespace_index > &a, const std::vector< namespace_index > &b)
 
template<generate_func_t< namespace_index > 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< extent_term > generate_func, bool leave_duplicate_interactions>
std::vector< std::vector< extent_term > > INTERACTIONS::compile_extent_interaction (const std::vector< extent_term > &interaction, const std::set< extent_term > &all_seen_extents)
 
template<generate_func_t< namespace_index > 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)
 
template<generate_func_t< extent_term > generate_func, bool leave_duplicate_interactions>
std::vector< std::vector< extent_term > > INTERACTIONS::compile_extent_interactions (const std::vector< std::vector< extent_term >> &interactions, const std::set< extent_term > &indices)
 

Variables

constexpr unsigned char INTERACTIONS::interaction_ns_start = ' '
 
constexpr unsigned char INTERACTIONS::interaction_ns_end = '~'