Computes the standard linear kernel on sparse real valued features.
Formally, it computes
在文件SparseLinearKernel.h第29行定义。

公有成员 | |
| CSparseLinearKernel () | |
| CSparseLinearKernel (CSparseFeatures< float64_t > *l, CSparseFeatures< float64_t > *r) | |
| virtual | ~CSparseLinearKernel () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| virtual EKernelType | get_kernel_type () |
| virtual const char * | get_name () const |
| virtual bool | init_optimization (int32_t num_suppvec, int32_t *sv_idx, float64_t *alphas) |
| virtual bool | delete_optimization () |
| virtual float64_t | compute_optimized (int32_t idx) |
| virtual void | clear_normal () |
| virtual void | add_to_normal (int32_t idx, float64_t weight) |
| const float64_t * | get_normal (int32_t &len) |
保护成员 | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
保护属性 | |
| float64_t * | normal |
| int32_t | normal_length |
constructor
在文件SparseLinearKernel.cpp第20行定义。
| CSparseLinearKernel | ( | CSparseFeatures< float64_t > * | l, | |
| CSparseFeatures< float64_t > * | r | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side |
在文件SparseLinearKernel.cpp第26行定义。
| ~CSparseLinearKernel | ( | ) | [virtual] |
在文件SparseLinearKernel.cpp第34行定义。
| void add_to_normal | ( | int32_t | idx, | |
| float64_t | weight | |||
| ) | [virtual] |
| void cleanup | ( | ) | [virtual] |
| void clear_normal | ( | ) | [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。
在文件SparseLinearKernel.cpp第72行定义。
| float64_t compute_optimized | ( | int32_t | idx | ) | [virtual] |
compute optimized
| idx | index to compute |
重载CKernel。
在文件SparseLinearKernel.cpp第115行定义。
| bool delete_optimization | ( | ) | [virtual] |
| virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
实现了CKernel。
在文件SparseLinearKernel.h第61行定义。
| virtual const char* get_name | ( | ) | const [virtual] |
| const float64_t* get_normal | ( | int32_t & | len | ) |
get normal
| len | length of normal vector will be stored here |
在文件SparseLinearKernel.h第108行定义。
initialize kernel
| l | features of left-hand side | |
| r | features of right-hand side |
在文件SparseLinearKernel.cpp第39行定义。
| bool init_optimization | ( | int32_t | num_suppvec, | |
| int32_t * | sv_idx, | |||
| float64_t * | alphas | |||
| ) | [virtual] |
optimizable kernel, i.e. precompute normal vector and as phi(x) = x do scalar product in input space
| num_suppvec | number of support vectors | |
| sv_idx | support vector index | |
| alphas | alphas |
重载CKernel。
在文件SparseLinearKernel.cpp第93行定义。
normal vector (used in case of optimized kernel)
在文件SparseLinearKernel.h第127行定义。
int32_t normal_length [protected] |
length of normal vector
在文件SparseLinearKernel.h第129行定义。