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

vigra::rf::visitors Namespace Reference
Machine Learning

Visitors to extract information during training of vigra::RandomForest version 2. More...

## 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

Visitors to extract information during training of vigra::RandomForest version 2.

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
vigra::RGBValue
Class for a single RGB value.
Definition rgbvalue.hxx:128
vigra::rf::visitors::OOB_Error
Definition rf_visitors.hxx:865
vigra::rf::visitors::VariableImportanceVisitor
Definition rf_visitors.hxx:1234
vigra::rf::visitors::create_visitor
detail::VisitorNode< A > create_visitor(A &a)
Definition rf_visitors.hxx:345

## Function Documentation

## ◆ create_visitor() [1/10]

template<class A >

detail::VisitorNode< A > create_visitor | ( | A & | a | ) |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [2/10]

template<class A , class B >

detail::VisitorNode< A, detail::VisitorNode< B > > create_visitor | ( | A & | a,
|  | B & | b
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [3/10]

template<class A , class B , class C >

detail::VisitorNode< A, detail::VisitorNode< B, detail::VisitorNode< C > > > create_visitor | ( | A & | a,
|  | B & | b,
|  | C & | c
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [4/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [5/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [6/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [7/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [8/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [9/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

## ◆ create_visitor() [10/10]

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
| ) |  |

factory method to to be used with RandomForest::learn()

© 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.12.1