X-Boost  2.3.8
Public Types | Public Member Functions | Static Public Member Functions | List of all members
BoostClassifier< Classifier > Struct Template Reference

#include <BoostClassifier.h>

Public Types

typedef detail::traits
< Classifier::Type, Classifier >
::Boosted 
BoostedClassifierType
 A Boosted Classifier (must be a "Real" Classifier)
 
typedef std::vector
< BoostedClassifierType
ClassifierListType
 List of Boosted classifier.
 
typedef BoostClassifier
< typename
Classifier::OptimizedType > 
OptimizedType
 An Optimized Classifier.
 

Public Member Functions

 BoostClassifier ()
 ctor
 
 BoostClassifier (std::istream &in)
 ctor with file with data
 
template<class R , class P0 , class P1 , class P2 >
 BoostClassifier (const BoostClassifier< R > &src, P0 scale, P1 p1, P2 p2)
 genera un BoostClassifier partendo da un altro BoostClassifier, ed eseguendo un rescaling di tutti i classificatori
 
template<class R , class P1 , class P2 >
 BoostClassifier (const BoostClassifier< R > &src, P1 p1, P2 p2)
 create and convert a classifier
 
template<class R , class P1 >
 BoostClassifier (const BoostClassifier< R > &src, const P1 &p1)
 create and convert a classifier
 
 ~BoostClassifier ()
 dtor
 
int size () const
 return the number of weak classifiers
 
ClassifierListTypelist ()
 Return the inner list of classifier.
 
const ClassifierListTypelist () const
 
template<class DataType >
float operator() (const DataType data) const
 
template<class DataType , class Param1 >
float operator() (const DataType data, Param1 p1) const
 
template<class FeatureType >
void export_features (std::vector< FeatureType > &out) const
 export all features;
 
void load (std::istream &in)
 
void save (std::ostream &out) const
 
void sort ()
 
void resize (int size)
 Reduce number of classifiers (remove the last or, after sort(), the low influence ones)
 
float max_response () const
 
void insert (const BoostedClassifierType &classifier)
 

Static Public Member Functions

static std::string signature ()
 propagate signature
 

Detailed Description

template<class Classifier>
struct BoostClassifier< Classifier >

A classifier that classifies using a majority vote of N (weak) classifier. Classifier could be any kind of weak classifier (Discrete or Real) Result are voted for majority

Member Function Documentation

template<class T >
void BoostClassifier< T >::load ( std::istream &  in)

load weak classifier from a stream

template<class Classifier>
float BoostClassifier< Classifier >::max_response ( ) const
inline

return the sum alphas associated to weak classifiers

Deprecated:
template<class Classifier>
template<class DataType >
float BoostClassifier< Classifier >::operator() ( const DataType  data) const
inline

The classifier operator. Runs the weak classifier and returns the sum of responses

Returns
the sum of single classifiers multiplied by their weights
template<class Classifier>
template<class DataType , class Param1 >
float BoostClassifier< Classifier >::operator() ( const DataType  data,
Param1  p1 
) const
inline

The classifier operator. Runs the weak classifier and returns the sum of responses

Returns
the sum of single classifiers multiplied by their weights
template<class T >
void BoostClassifier< T >::save ( std::ostream &  out) const

save weak classifier onto a stream

template<class T >
void BoostClassifier< T >::sort ( )

sort classifier with alpha descending (

Todo:
check)
Deprecated:

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