Public Member Functions | Protected Attributes
clsfy_binary_tree_op Class Reference

One node of a binary tree classifier - wrapper round clsfy_binary_threshold_1d. More...

#include <clsfy_binary_tree.h>

List of all members.

Public Member Functions

 clsfy_binary_tree_op ()
 clsfy_binary_tree_op (const vnl_vector< double > *data_ptr, int data_index=-1)
clsfy_binary_threshold_1dclassifier ()
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_

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

Definition at line 24 of file clsfy_binary_tree.h.

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.


The documentation for this class was generated from the following files: