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

details vigra::rf::visitors Namespace Reference VIGRA

Classes

class  CompleteOOBInfo
class  CorrelationVisitor
class  OnlineLearnVisitor
class  OOB_Error
class  OOB_PerTreeError
class  RandomForestProgressVisitor
class  StopVisiting
class  VariableImportanceVisitor
class  VisitorBase

Functions

template<class A >
detail::VisitorNode< A > create_visitor (A &a)
template<class A , class B >
detail::VisitorNode< A,
detail::VisitorNode< B > > 
create_visitor (A &a, B &b)
template<class A , class B , class C >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C > > > 
create_visitor (A &a, B &b, C &c)
template<class A , class B , class C , class D >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D > > > > 
create_visitor (A &a, B &b, C &c, D &d)
template<class A , class B , class C , class D , class E >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D,
detail::VisitorNode< E > > > > > 
create_visitor (A &a, B &b, C &c, D &d, E &e)
template<class A , class B , class C , class D , class E , class F >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D,
detail::VisitorNode< E,
detail::VisitorNode< F > > > > > > 
create_visitor (A &a, B &b, C &c, D &d, E &e, F &f)
template<class A , class B , class C , class D , class E , class F , class G >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D,
detail::VisitorNode< E,
detail::VisitorNode< F,
detail::VisitorNode< G > > > > > > > 
create_visitor (A &a, B &b, C &c, D &d, E &e, F &f, G &g)
template<class A , class B , class C , class D , class E , class F , class G , class H >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D,
detail::VisitorNode< E,
detail::VisitorNode< F,
detail::VisitorNode< G,
detail::VisitorNode< H > > > > > > > > 
create_visitor (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h)
template<class A , class B , class C , class D , class E , class F , class G , class H , class I >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D,
detail::VisitorNode< E,
detail::VisitorNode< F,
detail::VisitorNode< G,
detail::VisitorNode< H,
detail::VisitorNode< I > > > > > > > > > 
create_visitor (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i)
template<class A , class B , class C , class D , class E , class F , class G , class H , class I , class J >
detail::VisitorNode< A,
detail::VisitorNode< B,
detail::VisitorNode< C,
detail::VisitorNode< D,
detail::VisitorNode< E,
detail::VisitorNode< F,
detail::VisitorNode< G,
detail::VisitorNode< H,
detail::VisitorNode< I,
detail::VisitorNode< J > > > > > > > > > > 
create_visitor (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i, J &j)


Detailed Description

This namespace contains all classes and methods related to extracting information during learning of the random forest. All Visitors share the same interface defined in visitors::VisitorBase. The member methods are invoked at certain points of the main code in the order they were supplied.

For the Random Forest the Visitor concept is implemented as a statically linked list (Using templates). Each Visitor object is encapsulated in a detail::VisitorNode object. The VisitorNode object calls the Next Visitor after one of its visit() methods have terminated.

To simplify usage create_visitor() factory methods are supplied. Use the create_visitor() method to supply visitor objects to the RandomForest::learn() method. It is possible to supply more than one visitor. They will then be invoked in serial order.

The calculated information are stored as public data members of the class. - see documentation of the individual visitors

While creating a new visitor the new class should therefore publicly inherit from this class (i.e.: see visitors::OOB_Error).

      typedef xxx feature_t \\ replace xxx with whichever type
      typedef yyy label_t   \\ meme chose. 
      MultiArrayView<2, feature_t> f = get_some_features();
      MultiArrayView<2, label_t>   l = get_some_labels();
      RandomForest<> rf()
    
      //calculate OOB Error
      visitors::OOB_Error oob_v;
      //calculate Variable Importance
      visitors::VariableImportanceVisitor varimp_v;

      double oob_error = rf.learn(f, l, visitors::create_visitor(oob_v, varimp_v);
      //the data can be found in the attributes of oob_v and varimp_v now

© 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.9.0 (Tue Nov 6 2012)