Computes the standard polynomial kernel on dense real valued features.
Formally, it computes
Note that additional normalisation is applied, i.e.
在文件PolyKernel.h第34行定义。
公有成员 | |
CPolyKernel (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *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 |
保护成员 | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
保护属性 | |
int32_t | degree |
bool | inhomogene |
CPolyKernel | ( | CSimpleFeatures< float64_t > * | l, | |
CSimpleFeatures< float64_t > * | 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 |
在文件PolyKernel.cpp第26行定义。
CPolyKernel | ( | int32_t | size, | |
int32_t | degree, | |||
bool | inhomogene = true | |||
) |
~CPolyKernel | ( | ) | [virtual] |
在文件PolyKernel.cpp第34行定义。
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 |
实现了CKernel。
在文件PolyKernel.cpp第50行定义。
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
virtual const char* get_name | ( | ) | const [virtual] |
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
在文件PolyKernel.cpp第39行定义。
int32_t degree [protected] |
degree
在文件PolyKernel.h第94行定义。
bool inhomogene [protected] |
if kernel is inhomogeneous
在文件PolyKernel.h第96行定义。