Public Member Functions | Protected Member Functions | Protected Attributes

CGaussianShortRealKernel Class Reference

Detailed Description

The well known Gaussian kernel (swiss army knife for SVMs) on dense short-real valued features.

It is computed as

\[ k({\bf x},{\bf x'})= exp(-\frac{||{\bf x}-{\bf x'}||^2}{\tau}) \]

where $\tau$ is the kernel width.

Definition at line 31 of file GaussianShortRealKernel.h.

Inheritance diagram for CGaussianShortRealKernel:
Inheritance graph

List of all members.

Public Member Functions

 CGaussianShortRealKernel (void)
 CGaussianShortRealKernel (int32_t size, float64_t width)
 CGaussianShortRealKernel (CSimpleFeatures< float32_t > *l, CSimpleFeatures< float32_t > *r, float64_t width, int32_t size=10)
virtual ~CGaussianShortRealKernel ()
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)

Protected Attributes

float64_t width

Constructor & Destructor Documentation

CGaussianShortRealKernel ( void   ) 

default constructor

Definition at line 19 of file GaussianShortRealKernel.cpp.

CGaussianShortRealKernel ( int32_t  size,
float64_t  width 


size cache size
width width

Definition at line 26 of file GaussianShortRealKernel.cpp.

CGaussianShortRealKernel ( CSimpleFeatures< float32_t > *  l,
CSimpleFeatures< float32_t > *  r,
float64_t  width,
int32_t  size = 10 


l features of left-hand side
r features of right-hand side
width width
size cache size

Definition at line 31 of file GaussianShortRealKernel.cpp.

~CGaussianShortRealKernel (  )  [virtual]

Definition at line 38 of file GaussianShortRealKernel.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 48 of file GaussianShortRealKernel.cpp.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

kernel type GAUSSIAN

Implements CDotKernel.

Definition at line 68 of file GaussianShortRealKernel.h.

virtual const char* get_name ( void   )  const [virtual]

return the kernel's name

name GaussianShortReal

Reimplemented from CDotKernel.

Definition at line 74 of file GaussianShortRealKernel.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 42 of file GaussianShortRealKernel.cpp.

Member Data Documentation

float64_t width [protected]


Definition at line 89 of file GaussianShortRealKernel.h.

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