Public Member Functions | Protected Member Functions

CSplineKernel Class Reference


Detailed Description

Computes the Spline Kernel function which is the cubic polynomial.

The formula is:

\[ k({\bf x},{\bf x'})= 1 + {\bf x} \cdot {\bf x'} + {\bf x} \cdot {\bf x'} \cdot \mbox{min}(\bf x, \bf x') - \frac{\bf x + \bf x'}{2} \cdot \mbox{min}(\bf x, \bf x')^2 + \frac{ \mbox{min}(\bf x, \bf x')^3}{3} \]

Definition at line 36 of file SplineKernel.h.

Inheritance diagram for CSplineKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CSplineKernel ()
 CSplineKernel (CDotFeatures *l, CDotFeatures *r)
virtual ~CSplineKernel ()
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)

Constructor & Destructor Documentation

CSplineKernel (  ) 

constructor

Definition at line 21 of file SplineKernel.cpp.

constructor

Parameters:
l features of left-hand side
r features of right-hand side

Definition at line 25 of file SplineKernel.cpp.

~CSplineKernel (  )  [virtual]

Definition at line 30 of file SplineKernel.cpp.


Member Function Documentation

void cleanup (  )  [virtual]

clean up kernel

Reimplemented from CKernel.

Definition at line 47 of file SplineKernel.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 52 of file SplineKernel.cpp.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

Returns:
kernel type SPLINE

Implements CDotKernel.

Definition at line 67 of file SplineKernel.h.

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

return the kernel's name

Returns:
name Spline

Reimplemented from CDotKernel.

Definition at line 73 of file SplineKernel.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 35 of file SplineKernel.cpp.


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