[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
#include <vigra/random_forest/rf_decisionTree.hxx>
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 |
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) );
remove the classCount and featurecount from the topology array. Pass ext_param_ to the nodes!
Use relative addressing of nodes?
void reset | ( | unsigned int | classCount = 0 | ) |
clears all memory used.
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
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) |
bool isLeafNode | ( | TreeInt | in | ) | const |
is a node a Leaf Node?
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.
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)
TreeInt getToLeaf | ( | MultiArrayView< 2, U, C > const & | features | ) | const |
same thing as above, without any visitors
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|