X-Boost  2.3.8
Classes | Typedefs | Functions
WeightedPatternResponse.h File Reference

WeightedPatternResponse methods and utility functions. More...

#include <cmath>
#include "Classifier/DecisionStump.h"
#include "Classifier/MultiClassDecisionStump.h"
#include "Classifier/RealDecisionStump.h"

Go to the source code of this file.

Classes

struct  BinaryWeightedPatternResponse< ResponseType >
 
struct  WeightedPatternResponse< ResponseType >
 
class  AdaBoostMetric
 AdaBoost W+ metric (or any metric based on weighted pattern sum) for DecisionStumpPolicy (in this case only used as container for the param recovered) using PatternResponse. More...
 
class  GentleAdaBoostMetric
 
class  RealAdaBoostMetric
 

Typedefs

typedef
BinaryWeightedPatternResponse
< int > 
PatternResponse
 A weighted pattern response with integer values.
 

Functions

template<class Set >
void __InitializePatternResponse (BinaryWeightedPatternResponse< int > *store, int n_feature, const Set &set)
 set up d field in BinaryWeightedPatternResponse
 
template<class FeatureExtractor , class Set >
void ComputeFeaturesResponse (BinaryWeightedPatternResponse< int > *store, const FeatureExtractor *h, int n_feature, const Set &set, int i0, int i1)
 
template<class FeatureExtractor , class Set >
void ExtractFeature (BinaryWeightedPatternResponse< int > *store, const FeatureExtractor &h, const Set &set)
 extract from templates feature using h and put in store, and associating the weighted category d
 
void GenerateBucket (BinaryWeightedPatternResponse< int > *store, int n_bucket, const BinaryWeightedPatternResponse< int > *source, int n_element)
 
template<class FeatureExtractor , class Set >
void ExtractFeatureAndBucket (BinaryWeightedPatternResponse< int > *store, const FeatureExtractor &h, const Set &set, int n_bucket, int *value)
 
template<class FeatureExtractor , class Set >
void ExtractFeatureSubPart (WeightedPatternResponse< int > *store, const FeatureExtractor *h, int n_feature, const Set &set, int i0, int i1)
 
template<class FeatureExtractor , class Set >
void ExtractFeature (WeightedPatternResponse< int > *store, const FeatureExtractor &h, const Set &set)
 extract from templates feature using h and put in store, and associating the weighted category d
 
void sort_pattern (PatternResponse *store, int n)
 

Detailed Description

WeightedPatternResponse methods and utility functions.

Function Documentation

template<class FeatureExtractor , class Set >
void ComputeFeaturesResponse ( BinaryWeightedPatternResponse< int > *  store,
const FeatureExtractor h,
int  n_feature,
const Set &  set,
int  i0,
int  i1 
)

Used when multiple feature are evaluated at the same time on the same set, in a multi-thread flavor

Parameters
i0,i1range of training set evaluated
template<class FeatureExtractor , class Set >
void ExtractFeatureAndBucket ( BinaryWeightedPatternResponse< int > *  store,
const FeatureExtractor h,
const Set &  set,
int  n_bucket,
int *  value 
)

extract from templates feature using h and put in store, and associating the weighted category d

Parameters
valuea working vector set.Size() large
template<class FeatureExtractor , class Set >
void ExtractFeatureSubPart ( WeightedPatternResponse< int > *  store,
const FeatureExtractor h,
int  n_feature,
const Set &  set,
int  i0,
int  i1 
)

Used when multiple feature are evaluated at the same time on the same set, in a multi-thread flavor

Parameters
i0,i1range of training set evaluated
void GenerateBucket ( BinaryWeightedPatternResponse< int > *  store,
int  n_bucket,
const BinaryWeightedPatternResponse< int > *  source,
int  n_element 
)

Generate only bucket from a precompute response value array

Parameters
storean output histogram
n_bucketsize of the histogram, number of bin/bucket
sourceprecomputed response with weight
n_elementsize of precomputed response
void sort_pattern ( PatternResponse store,
int  n 
)

sort pattern with ascending "value". use before find_threshold