CGaussianKernel Class Reference


Detailed Description

The well known Gaussian kernel (swiss army knife for SVMs) on dense 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 GaussianKernel.h.

Inheritance diagram for CGaussianKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

CGaussianKernel (  ) 

default constructor

Definition at line 24 of file GaussianKernel.cpp.

CGaussianKernel ( int32_t  size,
float64_t  width 
)

constructor

Parameters:
size cache size
width width

Definition at line 30 of file GaussianKernel.cpp.

CGaussianKernel ( CSimpleFeatures< float64_t > *  l,
CSimpleFeatures< float64_t > *  r,
float64_t  width,
int32_t  size = 10 
)

constructor

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

Definition at line 35 of file GaussianKernel.cpp.

~CGaussianKernel (  )  [virtual]

Definition at line 42 of file GaussianKernel.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

Parameters:
idx_a index a
idx_b index b
Returns:
computed kernel function at indices a,b

Implements CKernel.

Reimplemented in CGaussianShiftKernel.

Definition at line 52 of file GaussianKernel.cpp.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

Returns:
kernel type GAUSSIAN

Implements CKernel.

Reimplemented in CGaussianShiftKernel.

Definition at line 70 of file GaussianKernel.h.

virtual const char* get_name (  )  const [virtual]

return the kernel's name

Returns:
name Gaussian

Implements CSGObject.

Reimplemented in CGaussianShiftKernel.

Definition at line 76 of file GaussianKernel.h.

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

initialize kernel

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

Reimplemented from CSimpleKernel< float64_t >.

Definition at line 46 of file GaussianKernel.cpp.


Member Data Documentation

float64_t width [protected]

width

Definition at line 111 of file GaussianKernel.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation