Public Member Functions | Protected Member Functions

CHistogramIntersectionKernel Class Reference

Detailed Description

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

\[ k({\bf x},({\bf x'})= \sum_{i=0}^{l} min(x_i,x'_i) \]

Definition at line 31 of file HistogramIntersectionKernel.h.

Inheritance diagram for CHistogramIntersectionKernel:
Inheritance graph

List of all members.

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)

Constructor & Destructor Documentation

default constructor

Definition at line 19 of file HistogramIntersectionKernel.cpp.

CHistogramIntersectionKernel ( int32_t  size  ) 


size cache size
width width

Definition at line 26 of file HistogramIntersectionKernel.cpp.


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.

Member Function Documentation

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
computed kernel function at indices a,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

name HistogramIntersection

Reimplemented from CDotKernel.

Definition at line 74 of file HistogramIntersectionKernel.h.

bool init ( CFeatures l,
CFeatures r 
) [virtual]

initialize kernel

l features of left-hand side
r features of right-hand side
if initializing was successful

Reimplemented from CDotKernel.

Definition at line 43 of file HistogramIntersectionKernel.cpp.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation