Public Member Functions | Protected Member Functions | Protected Attributes

CPowerKernel Class Reference


Detailed Description

Power kernel.

Formally described as

\[ K(x,x') = - \| x-x' \|^{degree} \]

Definition at line 35 of file PowerKernel.h.

Inheritance diagram for CPowerKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CPowerKernel ()
 CPowerKernel (int32_t cache, float64_t degree, CDistance *dist)
 CPowerKernel (CFeatures *l, CFeatures *r, float64_t degree, CDistance *dist)
virtual bool init (CFeatures *l, CFeatures *r)
virtual EKernelType get_kernel_type ()
virtual EFeatureType get_feature_type ()
virtual EFeatureClass get_feature_class ()
virtual const char * get_name () const
virtual ~CPowerKernel ()

Protected Member Functions

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

Protected Attributes

CDistancedistance
 distance to be used
float64_t m_degree
 degree parameter of kernel

Constructor & Destructor Documentation

CPowerKernel (  ) 

default constructor

Definition at line 16 of file PowerKernel.cpp.

CPowerKernel ( int32_t  cache,
float64_t  degree,
CDistance dist 
)

constructor

Parameters:
cache size of cache
degree kernel parameter degree
dist distance to be used

Definition at line 21 of file PowerKernel.cpp.

CPowerKernel ( CFeatures l,
CFeatures r,
float64_t  degree,
CDistance dist 
)

constructor

Parameters:
l features left-side
r features right-side
degree kernel parameter degree
dist distance to be used

Definition at line 29 of file PowerKernel.cpp.

~CPowerKernel (  )  [virtual]

Definition at line 38 of file PowerKernel.cpp.


Member Function Documentation

float64_t compute ( int32_t  idx_a,
int32_t  idx_b 
) [protected, virtual]

compute kernel for specific feature vectors corresponding to [idx_a] of left-side and [idx_b] of right-side

Parameters:
idx_a left-side index
idx_b right-side index
Returns:
kernel value

Implements CKernel.

Definition at line 59 of file PowerKernel.cpp.

virtual EFeatureClass get_feature_class (  )  [virtual]
Returns:
class of features

Implements CKernel.

Definition at line 76 of file PowerKernel.h.

virtual EFeatureType get_feature_type (  )  [virtual]
Returns:
type of features

Implements CKernel.

Definition at line 71 of file PowerKernel.h.

virtual EKernelType get_kernel_type (  )  [virtual]
Returns:
kernel type

Implements CKernel.

Definition at line 66 of file PowerKernel.h.

virtual const char* get_name ( void   )  const [virtual]
Returns:
name of kernel

Implements CSGObject.

Definition at line 81 of file PowerKernel.h.

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

initialize kernel with features

Parameters:
l features left-side
r features right-side
Returns:
true if successful

Reimplemented from CKernel.

Definition at line 44 of file PowerKernel.cpp.


Member Data Documentation

CDistance* distance [protected]

distance to be used

Definition at line 101 of file PowerKernel.h.

float64_t m_degree [protected]

degree parameter of kernel

Definition at line 104 of file PowerKernel.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