Public Member Functions | Protected Member Functions

CDotKernel Class Reference


Detailed Description

Template class DotKernel is the base class for kernels working on DotFeatures.

CDotFeatures are features supporting operations like dot product, dot product with a dense vector and addition to a dense vector. Therefore several dot product based kernels derive from this class (cf., e.g., CLinearKernel)

See also:
CDotFeatures

Definition at line 29 of file DotKernel.h.

Inheritance diagram for CDotKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CDotKernel ()
 CDotKernel (int32_t cachesize)
 CDotKernel (CFeatures *l, CFeatures *r)
virtual bool init (CFeatures *l, CFeatures *r)
virtual EFeatureClass get_feature_class ()
virtual EFeatureType get_feature_type ()
virtual const char * get_name (void) const
virtual EKernelType get_kernel_type ()=0

Protected Member Functions

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

Constructor & Destructor Documentation

CDotKernel (  ) 

default constructor

Definition at line 35 of file DotKernel.h.

CDotKernel ( int32_t  cachesize  ) 

constructor

Parameters:
cachesize cache size

Definition at line 41 of file DotKernel.h.

CDotKernel ( CFeatures l,
CFeatures r 
)

constructor

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

Definition at line 48 of file DotKernel.h.


Member Function Documentation

virtual 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

Implements CKernel.

Reimplemented in CANOVAKernel, CAUCKernel, CChi2Kernel, CExponentialKernel, CGaussianKernel, CGaussianShiftKernel, CGaussianShortRealKernel, CHistogramIntersectionKernel, CPolyKernel, CPyramidChi2, CSigmoidKernel, CSplineKernel, CTensorProductPairKernel, CWaveletKernel, and CWeightedDegreeRBFKernel.

Definition at line 121 of file DotKernel.h.

virtual EFeatureClass get_feature_class (  )  [virtual]

return feature class the kernel can deal with

dot kernel returns unknown since features can be based on anything

Returns:
feature class ANY

Implements CKernel.

Reimplemented in CANOVAKernel, CAUCKernel, CChi2Kernel, CTensorProductPairKernel, and CWeightedDegreeRBFKernel.

Definition at line 86 of file DotKernel.h.

virtual EFeatureType get_feature_type (  )  [virtual]

return feature type the kernel can deal with

dot kernel returns unknown since features can be based on anything

Returns:
ANY feature type

Implements CKernel.

Reimplemented in CANOVAKernel, CAUCKernel, CChi2Kernel, CTensorProductPairKernel, and CWeightedDegreeRBFKernel.

Definition at line 94 of file DotKernel.h.

virtual EKernelType get_kernel_type (  )  [pure virtual]
virtual const char* get_name ( void   )  const [virtual]

Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.

Returns:
name of the SGSerializable

Implements CSGObject.

Reimplemented in CANOVAKernel, CAUCKernel, CChi2Kernel, CExponentialKernel, CGaussianKernel, CGaussianShiftKernel, CGaussianShortRealKernel, CHistogramIntersectionKernel, CLinearKernel, CPolyKernel, CPyramidChi2, CSigmoidKernel, CSplineKernel, CTensorProductPairKernel, CWaveletKernel, and CWeightedDegreeRBFKernel.

Definition at line 101 of file DotKernel.h.

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

initialize kernel e.g. setup lhs/rhs of kernel, precompute normalization constants etc. make sure to check that your kernel can deal with the supplied features (!)

Parameters:
l features for left-hand side
r features for right-hand side
Returns:
if init was successful

Reimplemented from CKernel.

Reimplemented in CANOVAKernel, CAUCKernel, CChi2Kernel, CExponentialKernel, CGaussianKernel, CGaussianShortRealKernel, CHistogramIntersectionKernel, CLinearKernel, CPolyKernel, CPyramidChi2, CSigmoidKernel, CSplineKernel, CTensorProductPairKernel, CWaveletKernel, and CWeightedDegreeRBFKernel.

Definition at line 63 of file DotKernel.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation