The Diagonal Kernel returns a constant for the diagonal and zero otherwise.
A kernel that returns zero for all non-diagonal elements and a single constant otherwise, i.e.
Definition at line 26 of file DiagKernel.h.
Public Member Functions | |
CDiagKernel () | |
CDiagKernel (int32_t size, float64_t diag=1.0) | |
CDiagKernel (CFeatures *l, CFeatures *r, float64_t diag=1.0) | |
virtual | ~CDiagKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual EFeatureType | get_feature_type () |
virtual EFeatureClass | get_feature_class () |
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 | |
float64_t | diag |
CDiagKernel | ( | ) |
default constructor
Definition at line 20 of file DiagKernel.cpp.
CDiagKernel | ( | int32_t | size, | |
float64_t | diag = 1.0 | |||
) |
CDiagKernel | ( | CFeatures * | l, | |
CFeatures * | r, | |||
float64_t | diag = 1.0 | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
diag | diagonal |
Definition at line 33 of file DiagKernel.cpp.
~CDiagKernel | ( | ) | [virtual] |
Definition at line 41 of file DiagKernel.cpp.
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.
Definition at line 96 of file DiagKernel.h.
virtual EFeatureClass get_feature_class | ( | ) | [virtual] |
return feature class the kernel can deal with
Implements CKernel.
Definition at line 70 of file DiagKernel.h.
virtual EFeatureType get_feature_type | ( | ) | [virtual] |
return feature type the kernel can deal with
Implements CKernel.
Definition at line 61 of file DiagKernel.h.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CKernel.
Definition at line 79 of file DiagKernel.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
return the kernel's name
Implements CSGObject.
Definition at line 85 of file DiagKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CKernel.
Definition at line 45 of file DiagKernel.cpp.
diagonal
Definition at line 108 of file DiagKernel.h.