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)
Definition at line 29 of file DotKernel.h.
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) |
CDotKernel | ( | ) |
default constructor
Definition at line 35 of file DotKernel.h.
CDotKernel | ( | int32_t | cachesize | ) |
CDotKernel | ( | CFeatures * | l, | |
CFeatures * | r | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side |
Definition at line 48 of file DotKernel.h.
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
idx_a | index a | |
idx_b | index 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
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
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] |
return what type of kernel we are, e.g. Linear,Polynomial, Gaussian,...
abstract base method
Implements CKernel.
Implemented in CANOVAKernel, CAUCKernel, CChi2Kernel, CExponentialKernel, CGaussianKernel, CGaussianShiftKernel, CGaussianShortRealKernel, CHistogramIntersectionKernel, CLinearKernel, CPolyKernel, CPyramidChi2, CSigmoidKernel, CSplineKernel, CTensorProductPairKernel, CWaveletKernel, and CWeightedDegreeRBFKernel.
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'.
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.
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 (!)
l | features for left-hand side | |
r | features for right-hand side |
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.