The HistogramIntersection kernel operating on realvalued vectors computes the histogram intersection distance between sets of histograms. Note: the current implementation assumes positive values for the histograms, and input vectors should sum to 1.
It is defined as
with by default
Definition at line 31 of file HistogramIntersectionKernel.h.
Public Member Functions | |
CHistogramIntersectionKernel (void) | |
CHistogramIntersectionKernel (int32_t size) | |
CHistogramIntersectionKernel (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r, int32_t size) | |
virtual | ~CHistogramIntersectionKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | register_params () |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
float64_t | get_beta () |
void | set_beta (float64_t value) |
Protected Member Functions | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
float64_t | beta |
beta parameter |
CHistogramIntersectionKernel | ( | void | ) |
default constructor
Definition at line 19 of file HistogramIntersectionKernel.cpp.
CHistogramIntersectionKernel | ( | int32_t | size | ) |
constructor
size | cache size |
Definition at line 25 of file HistogramIntersectionKernel.cpp.
CHistogramIntersectionKernel | ( | CSimpleFeatures< float64_t > * | l, | |
CSimpleFeatures< float64_t > * | r, | |||
int32_t | size | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
size | cache size |
Definition at line 31 of file HistogramIntersectionKernel.cpp.
~CHistogramIntersectionKernel | ( | ) | [virtual] |
Definition at line 39 of file HistogramIntersectionKernel.cpp.
float64_t compute | ( | int32_t | idx_a, | |
int32_t | idx_b | |||
) | [protected, virtual] |
compute kernel function for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object
idx_a | index a | |
idx_b | index b |
Reimplemented from CDotKernel.
Definition at line 51 of file HistogramIntersectionKernel.cpp.
float64_t get_beta | ( | ) |
getter for beta parameter
Definition at line 80 of file HistogramIntersectionKernel.h.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CDotKernel.
Definition at line 69 of file HistogramIntersectionKernel.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Reimplemented from CDotKernel.
Definition at line 75 of file HistogramIntersectionKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CDotKernel.
Definition at line 44 of file HistogramIntersectionKernel.cpp.
void register_params | ( | ) | [virtual] |
Separate the function of parameter registration This can be the first stage of a *general* framework for cross-validation or other parameter-based operations
Reimplemented from CKernel.
Definition at line 83 of file HistogramIntersectionKernel.cpp.
void set_beta | ( | float64_t | value | ) |
setter for beta parameter
value | beta value |
Definition at line 85 of file HistogramIntersectionKernel.h.
beta parameter
Definition at line 90 of file HistogramIntersectionKernel.h.