Vowpal Wabbit
|
Classes | |
struct | feature_gen_data |
Functions | |
void | expand_namespaces_with_recursion (std::string const &ns, std::vector< std::string > &res, std::string &val, size_t pos) |
std::vector< std::string > | expand_interactions (const std::vector< std::string > &vec, const size_t required_length, const std::string &err_msg) |
bool | must_be_left_sorted (const std::string &oi) |
void | sort_and_filter_duplicate_interactions (std::vector< std::string > &vec, bool filter_duplicates, size_t &removed_cnt, size_t &sorted_cnt) |
size_t | factor (const size_t n, const size_t start_from=1) |
void | eval_count_of_generated_ft (vw &all, example &ec, size_t &new_features_cnt, float &new_features_value) |
constexpr bool | is_printable_namespace (const unsigned char ns) |
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) |
template<class R , class S , void(*)(R &, float, S) T> | |
void | generate_interactions (vw &all, example_predict &ec, R &dat) |
int64_t | choose (int64_t n, int64_t k) |
template<class R , void(*)(R &, const float, float &) T, class W > | |
void | call_T (R &dat, W &weights, const float ft_value, const uint64_t ft_idx) |
template<class R , void(*)(R &, const float, const float &) T, class W > | |
void | call_T (R &dat, const W &weights, const float ft_value, const uint64_t ft_idx) |
float | INTERACTION_VALUE (float value1, float value2) |
template<class R , class S , void(*)(R &, float, S) T, bool audit, void(*)(R &, const audit_strings *) audit_func, class W > | |
void | inner_kernel (R &dat, features::iterator_all &begin, features::iterator_all &end, const uint64_t offset, W &weights, feature_value ft_value, feature_index halfhash) |
template<class R , class S , void(*)(R &, float, S) T, bool audit, void(*)(R &, const audit_strings *) audit_func, class W > | |
void | generate_interactions (std::vector< std::string > &interactions, bool permutations, example_predict &ec, R &dat, W &weights) |
Variables | |
constexpr int64_t | fast_factorial [] |
constexpr size_t | size_fast_factorial = sizeof(fast_factorial) / sizeof(*fast_factorial) |
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 |
constexpr bool | feature_self_interactions = true |
|
inline |
Definition at line 31 of file interactions_predict.h.
Referenced by call_T().
|
inline |
Definition at line 37 of file interactions_predict.h.
References call_T().
|
inline |
Definition at line 69 of file interactions.h.
Referenced by eval_count_of_generated_ft().
void INTERACTIONS::eval_count_of_generated_ft | ( | vw & | all, |
example & | ec, | ||
size_t & | new_features_cnt, | ||
float & | new_features_value | ||
) |
Definition at line 228 of file interactions.cc.
References choose(), v_array< T >::delete_v(), example_predict::feature_space, example_predict::interactions, vw::permutations, PROCESS_SELF_INTERACTIONS, v_array< T >::push_back(), v_array< T >::size(), features::size(), and features::values.
Referenced by DepParserTask::extract_features(), is_printable_namespace(), and VW::setup_example().
std::vector< std::string > INTERACTIONS::expand_interactions | ( | const std::vector< std::string > & | vec, |
const size_t | required_length, | ||
const std::string & | err_msg | ||
) |
Definition at line 56 of file interactions.cc.
References expand_namespaces_with_recursion(), and THROW.
Referenced by is_printable_namespace(), and parse_feature_tweaks().
void INTERACTIONS::expand_namespaces_with_recursion | ( | std::string const & | ns, |
std::vector< std::string > & | res, | ||
std::string & | val, | ||
size_t | pos | ||
) |
Definition at line 14 of file interactions.cc.
References printable_end, printable_start, and valid_ns().
Referenced by expand_interactions().
|
inline |
Definition at line 214 of file interactions.cc.
|
inline |
Definition at line 45 of file interactions.h.
References parameters::dense_weights, example_predict::interactions, vw::permutations, parameters::sparse, parameters::sparse_weights, and vw::weights.
Referenced by audit_regressor().
|
inline |
Definition at line 57 of file interactions.h.
References parameters::dense_weights, vw::interactions, vw::permutations, parameters::sparse, parameters::sparse_weights, and vw::weights.
|
inline |
Definition at line 98 of file interactions_predict.h.
References v_array< T >::begin(), features::features_value_index_audit_range::begin(), v_array< T >::delete_v(), v_array< T >::end(), features::features_value_index_audit_range::end(), example_predict::feature_space, FNV_prime, INTERACTIONS::feature_gen_data::ft_arr, example_predict::ft_offset, INTERACTIONS::feature_gen_data::hash, features::indicies, INTERACTION_VALUE(), INTERACTIONS::feature_gen_data::loop_end, INTERACTIONS::feature_gen_data::loop_idx, features::nonempty(), PROCESS_SELF_INTERACTIONS, v_array< T >::push_back(), INTERACTIONS::feature_gen_data::self_interaction, v_array< T >::size(), features::space_names, features::values, features::values_indices_audit(), and INTERACTIONS::feature_gen_data::x.
|
inline |
Definition at line 74 of file interactions_predict.h.
References features_value_index_audit_iterator::audit(), features_value_index_iterator::index(), INTERACTION_VALUE(), and features_value_iterator::value().
|
inline |
Definition at line 66 of file interactions_predict.h.
Referenced by generate_interactions(), and inner_kernel().
|
inline |
Definition at line 22 of file interactions.h.
References eval_count_of_generated_ft(), expand_interactions(), printable_end, and sort_and_filter_duplicate_interactions().
Referenced by CCB::calculate_and_insert_interactions().
|
inline |
Definition at line 87 of file interactions.cc.
Referenced by sort_and_filter_duplicate_interactions().
void INTERACTIONS::sort_and_filter_duplicate_interactions | ( | std::vector< std::string > & | vec, |
bool | filter_duplicates, | ||
size_t & | removed_cnt, | ||
size_t & | sorted_cnt | ||
) |
Definition at line 116 of file interactions.cc.
References a, and must_be_left_sorted().
Referenced by is_printable_namespace(), and parse_feature_tweaks().
constexpr int64_t INTERACTIONS::fast_factorial[] |
Definition at line 203 of file interactions.cc.
constexpr bool INTERACTIONS::feature_self_interactions = true |
Definition at line 23 of file interactions_predict.h.
constexpr unsigned char INTERACTIONS::printable_end = '~' |
Definition at line 17 of file interactions.h.
Referenced by expand_namespaces_with_recursion(), and is_printable_namespace().
constexpr unsigned char INTERACTIONS::printable_ns_size = printable_end - printable_start |
Definition at line 18 of file interactions.h.
constexpr unsigned char INTERACTIONS::printable_start = ' ' |
Definition at line 16 of file interactions.h.
Referenced by CCB::calculate_and_insert_interactions(), and expand_namespaces_with_recursion().
constexpr size_t INTERACTIONS::size_fast_factorial = sizeof(fast_factorial) / sizeof(*fast_factorial) |
Definition at line 206 of file interactions.cc.
constexpr uint64_t INTERACTIONS::valid_ns_size |
Definition at line 19 of file interactions.h.