Public Member Functions | Protected Member Functions | Protected Attributes

CExponentialKernel Class Reference

Detailed Description

The Exponential Kernel, closely related to the Gaussian Kernel computed on CDotFeatures.

It is computed as

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

where $\tau$ is the kernel width.

Definition at line 37 of file ExponentialKernel.h.

Inheritance diagram for CExponentialKernel:
Inheritance graph

List of all members.

Public Member Functions

 CExponentialKernel ()
 CExponentialKernel (CDotFeatures *l, CDotFeatures *r, float64_t width, CDistance *distance, int32_t size)
virtual ~CExponentialKernel ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EKernelType get_kernel_type ()
virtual const char * get_name () const
virtual float64_t get_width () const

Protected Member Functions

virtual float64_t compute (int32_t idx_a, int32_t idx_b)
virtual void load_serializable_post () throw (ShogunException)

Protected Attributes

float64_t m_width

Constructor & Destructor Documentation

default constructor

Definition at line 22 of file ExponentialKernel.cpp.

CExponentialKernel ( CDotFeatures l,
CDotFeatures r,
float64_t  width,
CDistance distance,
int32_t  size 


l features of left-hand side
r features of right-hand side
width width
distance distance to be used
size cache size

Definition at line 28 of file ExponentialKernel.cpp.

~CExponentialKernel (  )  [virtual]


Definition at line 38 of file ExponentialKernel.cpp.

Member Function Documentation

void cleanup (  )  [virtual]

clean up kernel

Reimplemented from CKernel.

Definition at line 44 of file ExponentialKernel.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
computed kernel function at indices a,b

Reimplemented from CDotKernel.

Definition at line 57 of file ExponentialKernel.cpp.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

kernel type EXPONENTIAL

Implements CDotKernel.

Definition at line 74 of file ExponentialKernel.h.

virtual const char* get_name (  )  const [virtual]

return the kernel's name

name Exponential

Reimplemented from CDotKernel.

Definition at line 80 of file ExponentialKernel.h.

virtual float64_t get_width (  )  const [virtual]

return the kernel's width

kernel width

Definition at line 86 of file ExponentialKernel.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 49 of file ExponentialKernel.cpp.

void load_serializable_post (  )  throw (ShogunException) [protected, virtual]

Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.

ShogunException Will be thrown if an error occurres.

Reimplemented from CKernel.

Definition at line 64 of file ExponentialKernel.cpp.

Member Data Documentation

CDistance* m_distance [protected]


Definition at line 117 of file ExponentialKernel.h.

float64_t m_width [protected]


Definition at line 119 of file ExponentialKernel.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