Computes the standard polynomial kernel on CDotFeatures.
Formally, it computes
Note that additional normalisation is applied, i.e.
Definition at line 36 of file PolyKernel.h.

Public Member Functions | |
| CPolyKernel () | |
| CPolyKernel (CDotFeatures *l, CDotFeatures *r, int32_t d, bool inhom, int32_t size=10) | |
| CPolyKernel (int32_t size, int32_t degree, bool inhomogene=true) | |
| virtual | ~CPolyKernel () |
| 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) |
Protected Attributes | |
| int32_t | degree |
| bool | inhomogene |
| CPolyKernel | ( | ) |
default constructor
Definition at line 21 of file PolyKernel.cpp.
| CPolyKernel | ( | CDotFeatures * | l, | |
| CDotFeatures * | r, | |||
| int32_t | d, | |||
| bool | inhom, | |||
| int32_t | size = 10 | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| d | degree | |
| inhom | is inhomogeneous | |
| size | cache size |
Definition at line 37 of file PolyKernel.cpp.
| CPolyKernel | ( | int32_t | size, | |
| int32_t | degree, | |||
| bool | inhomogene = true | |||
| ) |
constructor
| size | cache size | |
| degree | degree | |
| inhomogene | is inhomogeneous |
Definition at line 29 of file PolyKernel.cpp.
| ~CPolyKernel | ( | ) | [virtual] |
Definition at line 47 of file PolyKernel.cpp.
| void cleanup | ( | ) | [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 |
Reimplemented from CDotKernel.
Definition at line 63 of file PolyKernel.cpp.
| virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CDotKernel.
Definition at line 78 of file PolyKernel.h.
| virtual const char* get_name | ( | ) | const [virtual] |
return the kernel's name
Reimplemented from CDotKernel.
Definition at line 84 of file PolyKernel.h.
initialize kernel
| l | features of left-hand side | |
| r | features of right-hand side |
Reimplemented from CDotKernel.
Definition at line 52 of file PolyKernel.cpp.
int32_t degree [protected] |
degree
Definition at line 102 of file PolyKernel.h.
bool inhomogene [protected] |
if kernel is inhomogeneous
Definition at line 104 of file PolyKernel.h.