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
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 EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
Protected Member Functions | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
CHistogramIntersectionKernel | ( | void | ) |
default constructor
Definition at line 19 of file HistogramIntersectionKernel.cpp.
CHistogramIntersectionKernel | ( | int32_t | size | ) |
constructor
size | cache size | |
width | width |
Definition at line 26 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 | |
width | width | |
size | cache size |
Definition at line 31 of file HistogramIntersectionKernel.cpp.
~CHistogramIntersectionKernel | ( | ) | [virtual] |
Definition at line 38 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 50 of file HistogramIntersectionKernel.cpp.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CDotKernel.
Definition at line 68 of file HistogramIntersectionKernel.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Reimplemented from CDotKernel.
Definition at line 74 of file HistogramIntersectionKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CDotKernel.
Definition at line 43 of file HistogramIntersectionKernel.cpp.