Vowpal Wabbit
|
Go to the source code of this file.
Classes | |
class | node_pred |
struct | node |
struct | log_multi |
Functions | |
void | init_leaf (node &n) |
node | init_node () |
void | init_tree (log_multi &d) |
uint32_t | min_left_right (log_multi &b, const node &n) |
uint32_t | find_switch_node (log_multi &b) |
void | update_min_count (log_multi &b, uint32_t node) |
void | display_tree_dfs (log_multi &b, const node &node, uint32_t depth) |
bool | children (log_multi &b, uint32_t ¤t, uint32_t &class_index, uint32_t label) |
void | train_node (log_multi &b, single_learner &base, example &ec, uint32_t ¤t, uint32_t &class_index, uint32_t) |
void | verify_min_dfs (log_multi &b, const node &node) |
size_t | sum_count_dfs (log_multi &b, const node &node) |
uint32_t | descend (node &n, float prediction) |
void | predict (log_multi &b, single_learner &base, example &ec) |
void | learn (log_multi &b, single_learner &base, example &ec) |
void | save_node_stats (log_multi &d) |
void | save_load_tree (log_multi &b, io_buf &model_file, bool read, bool text) |
base_learner * | log_multi_setup (options_i &options, vw &all) |
bool children | ( | log_multi & | b, |
uint32_t & | current, | ||
uint32_t & | class_index, | ||
uint32_t | label | ||
) |
Definition at line 178 of file log_multi.cc.
References find_switch_node(), init_leaf(), init_node(), log_multi::max_predictors, log_multi::nbofswaps, log_multi::nodes, log_multi::predictors_used, v_array< T >::push_back(), v_array< T >::size(), log_multi::swap_resist, v_array< T >::unique_add_sorted(), and update_min_count().
Referenced by enable_sources(), DepParserTask::extract_features(), learn(), DepParserTask::transition_eager(), and DepParserTask::transition_hybrid().
|
inline |
Definition at line 296 of file log_multi.cc.
References node::left, and node::right.
Referenced by learn(), recall_tree_ns::learn(), predict(), and recall_tree_ns::predict_from().
Definition at line 159 of file log_multi.cc.
References node::internal, node::left, node::max_count_label, node::min_count, log_multi::nodes, node::preds, node::right, and v_array< T >::size().
Referenced by verify_min_dfs().
|
inline |
Definition at line 133 of file log_multi.cc.
References log_multi::nodes.
Referenced by children().
|
inline |
Definition at line 96 of file log_multi.cc.
References node::base_predictor, v_array< T >::clear(), node::Eh, node::internal, node::left, node::max_count, node::max_count_label, node::n, node::norm_Eh, node::preds, and node::right.
Referenced by children(), and init_node().
|
inline |
Definition at line 110 of file log_multi.cc.
References init_leaf(), node::min_count, node::parent, and node::preds.
Referenced by children(), init_tree(), and save_load_tree().
void init_tree | ( | log_multi & | d | ) |
Definition at line 122 of file log_multi.cc.
References init_node(), log_multi::nbofswaps, log_multi::nodes, and v_array< T >::push_back().
Referenced by recall_tree_ns::init_tree(), log_multi_setup(), memory_tree_setup(), and recall_tree_setup().
void learn | ( | log_multi & | b, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 321 of file log_multi.cc.
References children(), descend(), example::l, MULTICLASS::label_t::label, label_type::mc, polylabel::multi, polyprediction::multiclass, log_multi::nodes, example::pred, predict(), log_multi::progress, polyprediction::scalar, polylabel::simple, train_node(), and update_min_count().
Referenced by log_multi_setup().
base_learner* log_multi_setup | ( | options_i & | options, |
vw & | all | ||
) |
Definition at line 496 of file log_multi.cc.
References add(), VW::config::options_i::add_and_parse(), LEARNER::as_singleline(), getLossFunction(), LEARNER::init_multiclass_learner(), init_tree(), learn(), vw::loss, LEARNER::make_base(), VW::config::make_option(), vw::p, predict(), save_load_tree(), setup_base(), and VW::config::options_i::was_supplied().
Referenced by parse_reductions().
Definition at line 128 of file log_multi.cc.
References node::left, log_multi::nodes, and node::right.
Referenced by update_min_count(), and verify_min_dfs().
void predict | ( | log_multi & | b, |
single_learner & | base, | ||
example & | ec | ||
) |
Definition at line 304 of file log_multi.cc.
References descend(), example::l, label_type::mc, polylabel::multi, polyprediction::multiclass, log_multi::nodes, example::pred, LEARNER::learner< T, E >::predict(), polyprediction::scalar, and polylabel::simple.
Referenced by learn(), and log_multi_setup().
Definition at line 397 of file log_multi.cc.
References node::base_predictor, bin_text_read_write_fixed(), node::Eh, node_pred::Ehk, io_buf::files, init_node(), node::internal, log_multi::k, node_pred::label, node_pred::label_count, node::left, node::max_count, node::max_count_label, log_multi::max_predictors, node::min_count, node::n, node_pred::nk, log_multi::nodes, node::norm_Eh, node_pred::norm_Ehk, node::parent, log_multi::predictors_used, node::preds, log_multi::progress, v_array< T >::push_back(), node::right, v_array< T >::size(), and log_multi::swap_resist.
Referenced by log_multi_setup(), and recall_tree_setup().
void save_node_stats | ( | log_multi & | d | ) |
Definition at line 350 of file log_multi.cc.
References log_multi::nodes, and v_array< T >::size().
Definition at line 288 of file log_multi.cc.
References node::internal, node::left, node::min_count, log_multi::nodes, and node::right.
void train_node | ( | log_multi & | b, |
single_learner & | base, | ||
example & | ec, | ||
uint32_t & | current, | ||
uint32_t & | class_index, | ||
uint32_t | |||
) |
Definition at line 251 of file log_multi.cc.
References example::l, label_data::label, LEARNER::learner< T, E >::learn(), log_multi::nodes, example::partial_prediction, LEARNER::learner< T, E >::predict(), and polylabel::simple.
Referenced by memory_tree_ns::insert_example(), learn(), recall_tree_ns::learn(), and memory_tree_ns::split_leaf().
|
inline |
Definition at line 144 of file log_multi.cc.
References min_left_right(), and log_multi::nodes.
Referenced by children(), and learn().
Definition at line 274 of file log_multi.cc.
References display_tree_dfs(), node::internal, node::left, node::min_count, min_left_right(), log_multi::nodes, and node::right.