Public Member Functions | Protected Member Functions | Protected Attributes

CGaussianShiftKernel Class Reference


Detailed Description

An experimental kernel inspired by the WeightedDegreePositionStringKernel and the Gaussian kernel.

It is computed as

\[ k({\bf x},{\bf x'})= \exp(-\frac{||{\bf x}-{\bf x'}||^2}{\tau}) + \sum_{s=1}^{S_{\mathrm{max}}/S_{\mathrm{step}}} \frac{1}{2s} \exp(-\frac{||{\bf x}_{[1:|{\bf x}|-sS_{\mathrm{step}}]}-{\bf x'}_{[sS_{\mathrm{step}}:|{\bf x}|]}||^2}{\tau}) + \sum_{s=1}^{S_{max}/S_{step}} \frac{1}{2s} \exp(-\frac{||{\bf x}_{[sS_{\mathrm{step}}:|{\bf x}|]}-{\bf x'}_{[1:|{\bf x}|-sS_{\mathrm{step}}]}||^2}{\tau}) + \]

where $\tau$ is the kernel width. The idea is to shift the dimensions of the input vectors against eachother. $S_{\mathrm{step}}$ is the step size (parameter shift_step) of the shifts and $S_{\mathrm{max}}$ (parameter max_shift) is the maximal shift.

Definition at line 37 of file GaussianShiftKernel.h.

Inheritance diagram for CGaussianShiftKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

int32_t max_shift
int32_t shift_step

Constructor & Destructor Documentation

CGaussianShiftKernel ( void   ) 

default constructor

Definition at line 19 of file GaussianShiftKernel.cpp.

CGaussianShiftKernel ( int32_t  size,
float64_t  width,
int32_t  max_shift,
int32_t  shift_step 
)

constructor

Parameters:
size cache size
width width
max_shift maximum shift
shift_step shift step

Definition at line 25 of file GaussianShiftKernel.cpp.

CGaussianShiftKernel ( CSimpleFeatures< float64_t > *  l,
CSimpleFeatures< float64_t > *  r,
float64_t  width,
int32_t  max_shift,
int32_t  shift_step,
int32_t  size = 10 
)

constructor

Parameters:
l features of left-hand side
r features of right-hand side
width width
max_shift maximum shift
shift_step shift step
size cache size

Definition at line 32 of file GaussianShiftKernel.cpp.

~CGaussianShiftKernel (  )  [virtual]

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

Reimplemented from CGaussianKernel.

Definition at line 45 of file GaussianShiftKernel.cpp.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

Returns:
kernel type GAUSSIANSHIFT

Reimplemented from CGaussianKernel.

Definition at line 74 of file GaussianShiftKernel.h.

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

return the kernel's name

Returns:
name GaussianShift

Reimplemented from CGaussianKernel.

Definition at line 80 of file GaussianShiftKernel.h.


Member Data Documentation

int32_t max_shift [protected]

maximum shift

Definition at line 98 of file GaussianShiftKernel.h.

int32_t shift_step [protected]

shift step

Definition at line 100 of file GaussianShiftKernel.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