The class PolyMatchStringKernel computes a variant of the polynomial kernel on strings of same length.
It is computed as
where I is the indicator function which evaluates to 1 if its argument is true and to 0 otherwise.
Note that additional normalisation is applied, i.e.
在文件PolyMatchStringKernel.h第36行定义。

公有成员 | |
| CPolyMatchStringKernel (int32_t size, int32_t degree, bool inhomogene) | |
| CPolyMatchStringKernel (CStringFeatures< char > *l, CStringFeatures< char > *r, int32_t degree, bool inhomogene) | |
| virtual | ~CPolyMatchStringKernel () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| virtual EKernelType | get_kernel_type () |
| virtual const char * | get_name () const |
| void | set_rescaling_enabled (bool n) |
| bool | get_rescaling_enabled () |
保护成员 | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
保护属性 | |
| int32_t | degree |
| bool | inhomogene |
| bool | rescaling |
| CPolyMatchStringKernel | ( | int32_t | size, | |
| int32_t | degree, | |||
| bool | inhomogene | |||
| ) |
constructor
| size | cache size | |
| degree | degree | |
| inhomogene | is inhomogeneous |
在文件PolyMatchStringKernel.cpp第20行定义。
| CPolyMatchStringKernel | ( | CStringFeatures< char > * | l, | |
| CStringFeatures< char > * | r, | |||
| int32_t | degree, | |||
| bool | inhomogene | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| degree | degree | |
| inhomogene | is inhomogeneous |
在文件PolyMatchStringKernel.cpp第26行定义。
| ~CPolyMatchStringKernel | ( | ) | [virtual] |
在文件PolyMatchStringKernel.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。
在文件PolyMatchStringKernel.cpp第50行定义。
| virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
实现了CKernel。
在文件PolyMatchStringKernel.h第75行定义。
| virtual const char* get_name | ( | ) | const [virtual] |
| bool get_rescaling_enabled | ( | ) |
在文件PolyMatchStringKernel.h第95行定义。
initialize kernel
| l | features of left-hand side | |
| r | features of right-hand side |
在文件PolyMatchStringKernel.cpp第39行定义。
| void set_rescaling_enabled | ( | bool | n | ) |
int32_t degree [protected] |
degree
在文件PolyMatchStringKernel.h第113行定义。
bool inhomogene [protected] |
if kernel is inhomogeneous
在文件PolyMatchStringKernel.h第115行定义。
bool rescaling [protected] |
true to rescale kernel with string length
在文件PolyMatchStringKernel.h第117行定义。