Class Histogram computes a histogram over all 16bit unsigned integers in the features.
Values in histogram are absolute counts (logarithmic)
Definition at line 22 of file Histogram.h.
Public Member Functions | |
CHistogram () | |
CHistogram (CStringFeatures< uint16_t > *f) | |
virtual | ~CHistogram () |
virtual bool | train () |
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::CHistogram | ( | ) |
default constructor
Definition at line 19 of file Histogram.cpp.
CHistogram::CHistogram | ( | CStringFeatures< uint16_t > * | f | ) |
CHistogram::~CHistogram | ( | ) | [virtual] |
Definition at line 32 of file Histogram.cpp.
void CHistogram::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 138 of file Histogram.cpp.
float64_t CHistogram::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 85 of file Histogram.cpp.
float64_t CHistogram::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 67 of file Histogram.cpp.
float64_t CHistogram::get_log_model_parameter | ( | int32_t | num_param | ) | [virtual] |
get logarithm of given model parameter
num_param | which param |
Implements CDistribution.
Definition at line 120 of file Histogram.cpp.
virtual const char* CHistogram::get_name | ( | ) | const [virtual] |
virtual int32_t CHistogram::get_num_model_parameters | ( | ) | [virtual] |
get number of model parameters
Implements CDistribution.
Definition at line 45 of file Histogram.h.
bool CHistogram::set_histogram | ( | float64_t * | src, | |
int32_t | num | |||
) | [virtual] |
set histogram
src | new histogram | |
num | number of values in histogram |
Definition at line 125 of file Histogram.cpp.
bool CHistogram::train | ( | ) | [virtual] |
train histogram
Implements CDistribution.
Definition at line 37 of file Histogram.cpp.
float64_t* CHistogram::hist [protected] |
histogram
Definition at line 90 of file Histogram.h.