X-Boost  2.3.8
Public Member Functions | Public Attributes | List of all members
PrecomputedPatternResponse< ResponseType > Struct Template Reference

Public Member Functions

 PrecomputedPatternResponse (int n_bins)
 
void allocate (int samples, int feats)
 allocate the response matrix
 
template<class TrainintSetType , class FeatureType >
void Precompute (const TrainintSetType &set, const std::vector< FeatureType > &feats, int max_concurrent_jobs)
 
void PrepareBins ()
 compute bin
 
void InitializeWeights ()
 Initialize ugual weights.
 
template<class Classifier >
void ExecuteClassifier (const Classifier &c, bool *correct_tables, double *_wp, double *_wn, int *_match) const
 

Public Attributes

int n_samples
 number of samples
 
int n_features
 number of feature preallocated
 
int * category
 category list
 
double * weights
 weights list
 
ResponseType * response
 response matrix. For performance reason it each row is a feature and columns are samples
 
std::pair< ResponseType,
ResponseType > * 
response_range
 precomputed response ranges
 
int * bin
 precomputed bin matrix (rows features, columns samples)
 
int number_of_bins
 Quantization level.
 

Member Function Documentation

template<class ResponseType>
template<class Classifier >
void PrecomputedPatternResponse< ResponseType >::ExecuteClassifier ( const Classifier &  c,
bool *  correct_tables,
double *  _wp,
double *  _wn,
int *  _match 
) const
inline

Run an Indirect Classifier (classifier running on precomputed feature response) and report statistics

Parameters
ca binary classifier
correct_tablesan array of bool, n_samples long
_wp,_wn,_matchpointer to a single variable, modified in exit
template<class ResponseType>
template<class TrainintSetType , class FeatureType >
void PrecomputedPatternResponse< ResponseType >::Precompute ( const TrainintSetType &  set,
const std::vector< FeatureType > &  feats,
int  max_concurrent_jobs 
)
inline
Parameters
featsa vector of features to be precomputed
Note
it is possible to Precompute again features keeping old weights if the size is the same
Todo:
multithreading!

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