One node of a binary tree classifier - wrapper round clsfy_binary_threshold_1d. More...
#include <clsfy_binary_tree.h>
Public Member Functions | |
clsfy_binary_tree_op () | |
clsfy_binary_tree_op (const vnl_vector< double > *data_ptr, int data_index=-1) | |
clsfy_binary_threshold_1d & | classifier () |
unsigned | data_index () const |
void | set_data_index (unsigned index) |
void | set_data_ptr (const vnl_vector< double > *data_ptr) |
const vnl_vector< double > & | data () const |
Return reference to data - NB throws std::bad_cast if null. | |
void | set_data (const vnl_vector< double > &inputs) |
double | val () const |
Return value. | |
unsigned | classify () |
Classify. | |
unsigned | ndims () |
void | b_write (vsl_b_ostream &bfs) const |
Save class to a binary File Stream. | |
void | b_read (vsl_b_istream &bfs) |
Load the class from a Binary File Stream. | |
short | version_no () const |
Protected Attributes | |
int | data_index_ |
const vnl_vector< double > * | data_ptr_ |
clsfy_binary_threshold_1d | classifier_ |
One node of a binary tree classifier - wrapper round clsfy_binary_threshold_1d.
Needs also to store the data feature index associated with the node Then it calls its binary classifier for that node Returns class zero if s_*x[i]<threshold_
Definition at line 18 of file clsfy_binary_tree.h.
clsfy_binary_tree_op::clsfy_binary_tree_op | ( | ) | [inline] |
Definition at line 28 of file clsfy_binary_tree.h.
clsfy_binary_tree_op::clsfy_binary_tree_op | ( | const vnl_vector< double > * | data_ptr, |
int | data_index = -1 |
||
) | [inline] |
Definition at line 29 of file clsfy_binary_tree.h.
void clsfy_binary_tree_op::b_read | ( | vsl_b_istream & | bfs | ) |
Load the class from a Binary File Stream.
Definition at line 431 of file clsfy_binary_tree.cxx.
void clsfy_binary_tree_op::b_write | ( | vsl_b_ostream & | bfs | ) | const |
Save class to a binary File Stream.
Definition at line 423 of file clsfy_binary_tree.cxx.
clsfy_binary_threshold_1d& clsfy_binary_tree_op::classifier | ( | ) | [inline] |
Definition at line 33 of file clsfy_binary_tree.h.
unsigned clsfy_binary_tree_op::classify | ( | ) | [inline] |
Classify.
Definition at line 46 of file clsfy_binary_tree.h.
const vnl_vector<double >& clsfy_binary_tree_op::data | ( | ) | const [inline] |
Return reference to data - NB throws std::bad_cast if null.
Definition at line 39 of file clsfy_binary_tree.h.
unsigned clsfy_binary_tree_op::data_index | ( | ) | const [inline] |
Definition at line 34 of file clsfy_binary_tree.h.
unsigned clsfy_binary_tree_op::ndims | ( | ) | [inline] |
Definition at line 48 of file clsfy_binary_tree.h.
void clsfy_binary_tree_op::set_data | ( | const vnl_vector< double > & | inputs | ) | [inline] |
Definition at line 41 of file clsfy_binary_tree.h.
void clsfy_binary_tree_op::set_data_index | ( | unsigned | index | ) | [inline] |
Definition at line 35 of file clsfy_binary_tree.h.
void clsfy_binary_tree_op::set_data_ptr | ( | const vnl_vector< double > * | data_ptr | ) | [inline] |
Definition at line 36 of file clsfy_binary_tree.h.
double clsfy_binary_tree_op::val | ( | ) | const [inline] |
Return value.
Definition at line 43 of file clsfy_binary_tree.h.
short clsfy_binary_tree_op::version_no | ( | ) | const [inline] |
Definition at line 56 of file clsfy_binary_tree.h.
Definition at line 24 of file clsfy_binary_tree.h.
int clsfy_binary_tree_op::data_index_ [protected] |
Definition at line 22 of file clsfy_binary_tree.h.
const vnl_vector<double>* clsfy_binary_tree_op::data_ptr_ [protected] |
Definition at line 23 of file clsfy_binary_tree.h.