Computes the standard polynomial kernel on sparse real valued features.
Formally, it computes
Note that additional normalisation is applied, i.e.
在文件SparsePolyKernel.h第33行定义。
公有成员 | |
CSparsePolyKernel (CSparseFeatures< float64_t > *l, CSparseFeatures< float64_t > *r, int32_t size, int32_t d, bool inhom) | |
CSparsePolyKernel (int32_t size, int32_t degree, bool inhomogene=true) | |
virtual | ~CSparsePolyKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | cleanup () |
virtual EFeatureType | get_feature_type () |
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 |
CSparsePolyKernel | ( | CSparseFeatures< float64_t > * | l, |
CSparseFeatures< float64_t > * | r, | ||
int32_t | size, | ||
int32_t | d, | ||
bool | inhom | ||
) |
constructor
l | features of left-hand side |
r | features of right-hand side |
size | cache size |
d | degree |
inhom | is inhomogeneous |
在文件SparsePolyKernel.cpp第25行定义。
CSparsePolyKernel | ( | int32_t | size, |
int32_t | degree, | ||
bool | inhomogene = true |
||
) |
constructor
size | cache size |
degree | degree |
inhomogene | is inhomogeneous |
在文件SparsePolyKernel.cpp第19行定义。
~CSparsePolyKernel | ( | ) | [virtual] |
在文件SparsePolyKernel.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。
在文件SparsePolyKernel.cpp第50行定义。
virtual EFeatureType get_feature_type | ( | ) | [virtual] |
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 |
在文件SparsePolyKernel.cpp第39行定义。
int32_t degree [protected] |
degree
在文件SparsePolyKernel.h第100行定义。
bool inhomogene [protected] |
if kernel is inhomogeneous
在文件SparsePolyKernel.h第102行定义。