The Chi2 kernel operating on realvalued vectors computes the chi-squared distance between sets of histograms.
It is a very useful distance in image recognition (used to detect objects).
It is defined as
Definition at line 32 of file Chi2Kernel.h.

Public Member Functions | |
| CChi2Kernel (void) | |
| CChi2Kernel (int32_t size, float64_t width) | |
| CChi2Kernel (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r, float64_t width, int32_t size) | |
| virtual | ~CChi2Kernel () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual EKernelType | get_kernel_type () |
| virtual EFeatureClass | get_feature_class () |
| virtual EFeatureType | get_feature_type () |
| virtual const char * | get_name () const |
Protected Member Functions | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
| float64_t | width |
| CChi2Kernel | ( | void | ) |
default constructor
Definition at line 25 of file Chi2Kernel.cpp.
| CChi2Kernel | ( | int32_t | size, | |
| float64_t | width | |||
| ) |
| CChi2Kernel | ( | CSimpleFeatures< float64_t > * | l, | |
| CSimpleFeatures< float64_t > * | r, | |||
| float64_t | width, | |||
| int32_t | size | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| width | width | |
| size | cache size |
Definition at line 37 of file Chi2Kernel.cpp.
| ~CChi2Kernel | ( | ) | [virtual] |
Definition at line 45 of file Chi2Kernel.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 57 of file Chi2Kernel.cpp.
| virtual EFeatureClass get_feature_class | ( | ) | [virtual] |
return feature class the kernel can deal with
Reimplemented from CDotKernel.
Definition at line 77 of file Chi2Kernel.h.
| virtual EFeatureType get_feature_type | ( | ) | [virtual] |
return feature type the kernel can deal with
Reimplemented from CDotKernel.
Definition at line 83 of file Chi2Kernel.h.
| virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CDotKernel.
Definition at line 71 of file Chi2Kernel.h.
| virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Reimplemented from CDotKernel.
Definition at line 89 of file Chi2Kernel.h.
initialize kernel
| l | features of left-hand side | |
| r | features of right-hand side |
Reimplemented from CDotKernel.
Definition at line 50 of file Chi2Kernel.cpp.
width
Definition at line 104 of file Chi2Kernel.h.