[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

details DecisionTree VIGRA

#include <vigra/random_forest/rf_decisionTree.hxx>

List of all members.

Public Types

typedef Int32 TreeInt

Public Member Functions

template<class T>
 DecisionTree (ProblemSpec< T > ext_param)
 Create tree with parameters.
template<class U, class C>
TreeInt getToLeaf (MultiArrayView< 2, U, C > const &features) const
template<class U, class C, class Visitor_t>
TreeInt getToLeaf (MultiArrayView< 2, U, C > const &features, Visitor_t &visitor) const
bool isLeafNode (TreeInt in) const
template<class U, class C, class U2, class C2, class StackEntry_t, class Stop_t, class Split_t, class Visitor_t, class Random_t>
void learn (MultiArrayView< 2, U, C > const &features, MultiArrayView< 2, U2, C2 > const &labels, StackEntry_t const &stack_entry, Split_t split, Stop_t stop, Visitor_t &visitor, Random_t &randint)
void reset (unsigned int classCount=0)
template<class Visitor_t>
void traverse_mem_order (Visitor_t visitor) const


Detailed Description

decisiontree classifier.

This class is actually meant to be used in conjunction with the Random Forest Classifier

      RandomForest decisionTree(RF_Traits::Options_t()
                                  .features_per_node(RF_ALL)
                                  .tree_count(1)            );

Todo:
remove the classCount and featurecount from the topology array. Pass ext_param_ to the nodes!
Todo:
Use relative addressing of nodes?

Member Typedef Documentation

typedef Int32 TreeInt

Todo:
make private?
value type of container array. use whenever referencing it


Member Function Documentation

TreeInt getToLeaf ( MultiArrayView< 2, U, C > const &  features  )  const

same thing as above, without any visitors

TreeInt getToLeaf ( MultiArrayView< 2, U, C > const &  features,
Visitor_t &  visitor 
) const

data driven traversal from root to leaf

traverse through tree with data given in features. Use Visitors to collect statistics along the way.

bool isLeafNode ( TreeInt  in  )  const

is a node a Leaf Node?

template<class U, class C, class U2, class C2, class StackEntry_t, class Stop_t, class Split_t, class Visitor_t, class Random_t>
void learn ( MultiArrayView< 2, U, C > const &  features,
MultiArrayView< 2, U2, C2 > const &  labels,
StackEntry_t const &  stack_entry,
Split_t  split,
Stop_t  stop,
Visitor_t &  visitor,
Random_t &  randint 
)

learn a Tree

Template Parameters:
StackEntry_t The Stackentry containing Node/StackEntry_t Information used during learing. Each Split functor has a Stack entry associated with it (Split_t::StackEntry_t)
See also:
RandomForest::learn()

void reset ( unsigned int  classCount = 0  ) 

clears all memory used.

template<class Visitor_t>
void traverse_mem_order ( Visitor_t  visitor  )  const

traverse tree to get statistics

Tree is traversed in order the Nodes are in memory (i.e. if no relearning//pruning scheme is utilized this will be pre order)


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

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.7.1 (3 Dec 2010)