bazar
1.3.1
|
Node for classifier trees (cf image_classification_tree) More...
#include <image_classification_node.h>
Public Attributes | |
const int | children_number |
int | d1 |
int | d2 |
int | du1 |
int | dv1 |
int | du2 |
int | dv2 |
bool | leaf |
image_classification_node * | children [3] |
image_classification_node * | parent |
int | depth |
int | index |
int * | children_index |
float * | P |
int | best_class |
float | P_sum |
float | probability_sum |
vector< image_class_example * > * | examples |
int | class_number |
Friends | |
ostream & | operator<< (ostream &o, const image_classification_node &node) |
istream & | operator>> (istream &i, image_classification_node &node) |
Node for classifier trees (cf image_classification_tree)
Definition at line 40 of file image_classification_node.h.
image_classification_node::image_classification_node | ( | void | ) |
Definition at line 26 of file image_classification_node.cpp.
References class_number, depth, examples, leaf, P, and parent.
Referenced by end_recursion(), and expand().
image_classification_node::~image_classification_node | ( | void | ) |
Definition at line 50 of file image_classification_node.cpp.
References children, children_number, examples, is_leaf(), and P.
image_classification_node::image_classification_node | ( | int | depth, |
int | class_number, | ||
image_classification_node * | parent = 0 |
||
) |
Definition at line 38 of file image_classification_node.cpp.
References class_number, depth, examples, leaf, P, and parent.
void image_classification_node::add_example | ( | image_class_example * | pv | ) |
Definition at line 60 of file image_classification_node.cpp.
References examples.
Referenced by expand().
void image_classification_node::change_class_number_and_reset_probabilities | ( | int | new_class_number | ) |
Definition at line 173 of file image_classification_node.cpp.
References children, children_number, class_number, is_leaf(), and P.
Referenced by image_classification_tree::change_class_number_and_reset_probabilities().
int image_classification_node::child_index | ( | image_class_example * | pv | ) | const |
Definition at line 154 of file image_classification_node.cpp.
References dot_product().
Referenced by image_classification_tree::recognize(), and image_classification_tree::refine().
int image_classification_node::dot_product | ( | image_class_example * | pv | ) | const |
Definition at line 148 of file image_classification_node.cpp.
References d1, d2, mcvRow, and image_class_example::preprocessed.
Referenced by child_index(), and fall_in_child().
void image_classification_node::end_recursion | ( | void | ) |
Definition at line 162 of file image_classification_node.cpp.
References children, children_number, class_number, depth, image_classification_node(), and P.
Referenced by image_classification_forest::create_trees_at_random().
void image_classification_node::expand | ( | void | ) |
Definition at line 118 of file image_classification_node.cpp.
References add_example(), children, children_number, class_number, depth, examples, fall_in_child(), and image_classification_node().
Referenced by image_classification_forest::create_trees_at_random().
bool image_classification_node::fall_in_child | ( | image_class_example * | pv, |
int | child_index | ||
) |
Definition at line 138 of file image_classification_node.cpp.
References dot_product().
Referenced by expand().
|
inline |
Definition at line 104 of file image_classification_node.h.
Referenced by change_class_number_and_reset_probabilities(), leaves_number(), image_classification_tree::load(), load_probability_sums_recursive(), node_number(), operator<<(), image_classification_tree::posterior_probabilities(), image_classification_tree::recognize(), reestimate_probabilities_recursive(), image_classification_forest::refine(), image_classification_tree::refine(), reset_class_occurances_recursive(), restore_occurances_recursive(), save_probability_sums_recursive(), and ~image_classification_node().
int image_classification_node::leaves_number | ( | void | ) |
Definition at line 277 of file image_classification_node.cpp.
References children, children_number, and is_leaf().
Referenced by image_classification_tree::leaves_number().
void image_classification_node::load_probability_sums_recursive | ( | std::ifstream & | wfs | ) |
Definition at line 268 of file image_classification_node.cpp.
References children, children_number, is_leaf(), and probability_sum.
ostream& image_classification_node::name | ( | ostream & | o | ) | const |
|
inline |
Definition at line 82 of file image_classification_node.h.
Referenced by premature_end_recursion(), and should_stop_recursion().
int image_classification_node::node_number | ( | void | ) |
Definition at line 292 of file image_classification_node.cpp.
References children, children_number, and is_leaf().
Referenced by image_classification_tree::node_number().
void image_classification_node::premature_end_recursion | ( | void | ) |
Definition at line 90 of file image_classification_node.cpp.
References best_class, class_number, examples, nb_examples(), and P.
void image_classification_node::print_name | ( | void | ) |
float image_classification_node::projection | ( | image_class_example * | pv | ) | const |
void image_classification_node::reestimate_probabilities_recursive | ( | float * | weights = 0 | ) |
Definition at line 191 of file image_classification_node.cpp.
References best_class, children, children_number, class_number, is_leaf(), P, and probability_sum.
Referenced by image_classification_tree::refine().
int image_classification_node::represented_class_number | ( | void | ) | const |
Referenced by should_stop_recursion().
void image_classification_node::reset_class_occurances_recursive | ( | int | class_index | ) |
Definition at line 250 of file image_classification_node.cpp.
References children, children_number, is_leaf(), and P.
void image_classification_node::restore_occurances_recursive | ( | float * | weights = 0 | ) |
Definition at line 230 of file image_classification_node.cpp.
References children, children_number, class_number, is_leaf(), P, and probability_sum.
void image_classification_node::save_probability_sums_recursive | ( | std::ofstream & | wfs | ) |
Definition at line 259 of file image_classification_node.cpp.
References children, children_number, is_leaf(), and probability_sum.
void image_classification_node::set_Dot | ( | int | image_width, |
int | image_height | ||
) |
Definition at line 307 of file image_classification_node.cpp.
References d1, d2, du1, du2, dv1, dv2, leaf, and rand_m1p1().
Referenced by image_classification_forest::create_trees_at_random().
void image_classification_node::set_Dot | ( | int | _du1, |
int | _dv1, | ||
int | _du2, | ||
int | _dv2, | ||
int | image_width, | ||
int | image_height | ||
) |
bool image_classification_node::should_stop_recursion | ( | void | ) |
Definition at line 67 of file image_classification_node.cpp.
References examples, nb_examples(), and represented_class_number().
int image_classification_node::subtree_depth | ( | void | ) |
|
friend |
Definition at line 340 of file image_classification_node.cpp.
|
friend |
Definition at line 374 of file image_classification_node.cpp.
int image_classification_node::best_class |
Definition at line 94 of file image_classification_node.h.
Referenced by operator>>(), premature_end_recursion(), image_classification_tree::recognize(), and reestimate_probabilities_recursive().
image_classification_node* image_classification_node::children[3] |
Definition at line 87 of file image_classification_node.h.
Referenced by change_class_number_and_reset_probabilities(), image_classification_forest::create_trees_at_random(), end_recursion(), expand(), leaves_number(), image_classification_tree::load(), load_probability_sums_recursive(), node_number(), operator<<(), image_classification_tree::posterior_probabilities(), image_classification_tree::recognize(), reestimate_probabilities_recursive(), image_classification_forest::refine(), image_classification_tree::refine(), reset_class_occurances_recursive(), restore_occurances_recursive(), save_probability_sums_recursive(), and ~image_classification_node().
int* image_classification_node::children_index |
Definition at line 91 of file image_classification_node.h.
Referenced by image_classification_tree::load().
const int image_classification_node::children_number |
Definition at line 84 of file image_classification_node.h.
Referenced by change_class_number_and_reset_probabilities(), image_classification_forest::create_trees_at_random(), end_recursion(), expand(), leaves_number(), image_classification_tree::load(), load_probability_sums_recursive(), node_number(), operator<<(), reestimate_probabilities_recursive(), reset_class_occurances_recursive(), restore_occurances_recursive(), save_probability_sums_recursive(), and ~image_classification_node().
int image_classification_node::class_number |
Definition at line 101 of file image_classification_node.h.
Referenced by change_class_number_and_reset_probabilities(), end_recursion(), expand(), image_classification_node(), operator<<(), operator>>(), premature_end_recursion(), reestimate_probabilities_recursive(), and restore_occurances_recursive().
int image_classification_node::d1 |
Definition at line 85 of file image_classification_node.h.
Referenced by dot_product(), image_classification_tree::posterior_probabilities(), image_classification_forest::refine(), and set_Dot().
int image_classification_node::d2 |
Definition at line 85 of file image_classification_node.h.
Referenced by dot_product(), image_classification_tree::posterior_probabilities(), image_classification_forest::refine(), and set_Dot().
int image_classification_node::depth |
Definition at line 89 of file image_classification_node.h.
Referenced by image_classification_forest::create_trees_at_random(), end_recursion(), expand(), image_classification_node(), operator<<(), and operator>>().
int image_classification_node::du1 |
Definition at line 85 of file image_classification_node.h.
Referenced by operator<<(), and set_Dot().
int image_classification_node::du2 |
Definition at line 85 of file image_classification_node.h.
Referenced by operator<<(), and set_Dot().
int image_classification_node::dv1 |
Definition at line 85 of file image_classification_node.h.
Referenced by operator<<(), and set_Dot().
int image_classification_node::dv2 |
Definition at line 85 of file image_classification_node.h.
Referenced by operator<<(), and set_Dot().
vector<image_class_example *>* image_classification_node::examples |
Definition at line 99 of file image_classification_node.h.
Referenced by add_example(), expand(), image_classification_node(), premature_end_recursion(), should_stop_recursion(), and ~image_classification_node().
int image_classification_node::index |
Definition at line 89 of file image_classification_node.h.
Referenced by image_classification_forest::create_trees_at_random(), operator<<(), and operator>>().
bool image_classification_node::leaf |
Definition at line 86 of file image_classification_node.h.
Referenced by image_classification_node(), and set_Dot().
float* image_classification_node::P |
Definition at line 93 of file image_classification_node.h.
Referenced by change_class_number_and_reset_probabilities(), end_recursion(), image_classification_node(), operator<<(), operator>>(), image_classification_tree::posterior_probabilities(), premature_end_recursion(), image_classification_tree::recognize(), reestimate_probabilities_recursive(), image_classification_forest::refine(), image_classification_tree::refine(), reset_class_occurances_recursive(), restore_occurances_recursive(), and ~image_classification_node().
float image_classification_node::P_sum |
Definition at line 95 of file image_classification_node.h.
image_classification_node* image_classification_node::parent |
Definition at line 88 of file image_classification_node.h.
Referenced by image_classification_node(), and image_classification_tree::load().
float image_classification_node::probability_sum |
Definition at line 97 of file image_classification_node.h.
Referenced by load_probability_sums_recursive(), reestimate_probabilities_recursive(), restore_occurances_recursive(), and save_probability_sums_recursive().