Public Member Functions | Protected Member Functions | Protected Attributes

CWaveletKernel Class Reference


Detailed Description

the class WaveletKernel

It is defined as

\[ k({\bf x},({\bf x'})= \prod_{i=0}^{l}h(\frac{(x-c)}{a})\cdot h(\frac{(x'-c)}{a}) \]

Where $h(x)$ is the mother wavelet function

\[ h({\bf x}=cos(1.75*x)\cdot exp(\frac{(-x^2)}{2}) \]

Definition at line 35 of file WaveletKernel.h.

Inheritance diagram for CWaveletKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CWaveletKernel ()
 CWaveletKernel (int32_t size, float64_t Wdilation, float64_t Wtranslation)
 CWaveletKernel (CDotFeatures *l, CDotFeatures *r, int32_t size, float64_t Wdilation, float64_t Wtranslation)
virtual ~CWaveletKernel ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
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)
float64_t MotherWavelet (float64_t h)

Protected Attributes

float64_t Wdilation
float64_t Wtranslation

Constructor & Destructor Documentation

CWaveletKernel (  ) 

default constructor

Definition at line 17 of file WaveletKernel.cpp.

CWaveletKernel ( int32_t  size,
float64_t  Wdilation,
float64_t  Wtranslation 
)

constructor

Parameters:
size cache size
Wdilation is Dilation coefficient
Wtranslation is Translation coefficient

Definition at line 22 of file WaveletKernel.cpp.

CWaveletKernel ( CDotFeatures l,
CDotFeatures r,
int32_t  size,
float64_t  Wdilation,
float64_t  Wtranslation 
)

constructor

Parameters:
l features of left-hand side
r features of right-hand side
size cache size
Wdilation is Dilation coefficient
Wtranslation is Translation coefficient

Definition at line 28 of file WaveletKernel.cpp.

~CWaveletKernel (  )  [virtual]

Definition at line 36 of file WaveletKernel.cpp.


Member Function Documentation

void cleanup (  )  [virtual]

clean up your kernel

base method only removes lhs and rhs overload to add further cleanup but make sure CKernel::cleanup() is called

Reimplemented from CKernel.

Definition at line 41 of file WaveletKernel.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

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

Reimplemented from CDotKernel.

Definition at line 57 of file WaveletKernel.cpp.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

Returns:
kernel type wavelet

Implements CDotKernel.

Definition at line 75 of file WaveletKernel.h.

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

return the kernel's name

Returns:
name Wavelet

Reimplemented from CDotKernel.

Definition at line 81 of file WaveletKernel.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 CDotKernel.

Definition at line 45 of file WaveletKernel.cpp.

float64_t MotherWavelet ( float64_t  h  )  [protected]

h(x) is a mother wavelet function

Definition at line 96 of file WaveletKernel.h.


Member Data Documentation

float64_t Wdilation [protected]

dilation coefficient

Definition at line 106 of file WaveletKernel.h.

float64_t Wtranslation [protected]

translation coefficient

Definition at line 108 of file WaveletKernel.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