Class Histogram computes a histogram over all 16bit unsigned integers in the features.
Values in histogram are absolute counts (logarithmic)
Definition at line 26 of file Histogram.h.
Public Member Functions | |
CHistogram () | |
CHistogram (CStringFeatures< uint16_t > *f) | |
virtual | ~CHistogram () |
virtual bool | train (CFeatures *data=NULL) |
virtual int32_t | get_num_model_parameters () |
virtual float64_t | get_log_model_parameter (int32_t num_param) |
virtual float64_t | get_log_derivative (int32_t num_param, int32_t num_example) |
virtual float64_t | get_log_likelihood_example (int32_t num_example) |
virtual bool | set_histogram (float64_t *src, int32_t num) |
virtual void | get_histogram (float64_t **dst, int32_t *num) |
virtual const char * | get_name () const |
Protected Attributes | |
float64_t * | hist |
CHistogram | ( | ) |
default constructor
Definition at line 20 of file Histogram.cpp.
CHistogram | ( | CStringFeatures< uint16_t > * | f | ) |
~CHistogram | ( | ) | [virtual] |
Definition at line 33 of file Histogram.cpp.
void get_histogram | ( | float64_t ** | dst, | |
int32_t * | num | |||
) | [virtual] |
get histogram
dst | where the histogram will be stored | |
num | where number of values in histogram will be stored |
Definition at line 161 of file Histogram.cpp.
float64_t get_log_derivative | ( | int32_t | num_param, | |
int32_t | num_example | |||
) | [virtual] |
get logarithm of one example's derivative's likelihood
num_param | which example's param | |
num_example | which example |
Implements CDistribution.
Definition at line 104 of file Histogram.cpp.
float64_t get_log_likelihood_example | ( | int32_t | num_example | ) | [virtual] |
get logarithm of one example's likelihood
num_example | which example |
Implements CDistribution.
Definition at line 82 of file Histogram.cpp.
float64_t get_log_model_parameter | ( | int32_t | num_param | ) | [virtual] |
get logarithm of given model parameter
num_param | which param |
Implements CDistribution.
Definition at line 143 of file Histogram.cpp.
virtual const char* get_name | ( | void | ) | const [virtual] |
virtual int32_t get_num_model_parameters | ( | ) | [virtual] |
get number of model parameters
Implements CDistribution.
Definition at line 53 of file Histogram.h.
bool set_histogram | ( | float64_t * | src, | |
int32_t | num | |||
) | [virtual] |
set histogram
src | new histogram | |
num | number of values in histogram |
Definition at line 148 of file Histogram.cpp.
bool train | ( | CFeatures * | data = NULL |
) | [virtual] |
learn distribution
data | training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data) |
Implements CDistribution.
Definition at line 38 of file Histogram.cpp.
histogram
Definition at line 98 of file Histogram.h.