The class SNPStringKernel computes a variant of the polynomial kernel on strings of same length.
It is computed as FIXME
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.
在文件SNPStringKernel.h第36行定义。

公有成员 | |
| CSNPStringKernel (int32_t size, int32_t degree, int32_t win_len, bool inhomogene) | |
| CSNPStringKernel (CStringFeatures< char > *l, CStringFeatures< char > *r, int32_t degree, int32_t win_len, bool inhomogene) | |
| virtual | ~CSNPStringKernel () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| virtual EKernelType | get_kernel_type () |
| void | set_minor_base_string (const char *str) |
| void | set_major_base_string (const char *str) |
| char * | get_minor_base_string () |
| char * | get_major_base_string () |
| void | obtain_base_strings () |
| virtual const char * | get_name () const |
保护成员 | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
保护属性 | |
| int32_t | m_degree |
| int32_t | m_win_len |
| bool | m_inhomogene |
| int32_t | m_str_len |
| char * | m_str_min |
| char * | m_str_maj |
| CSNPStringKernel | ( | int32_t | size, | |
| int32_t | degree, | |||
| int32_t | win_len, | |||
| bool | inhomogene | |||
| ) |
constructor
| size | cache size | |
| degree | degree | |
| win_len | length of local window | |
| inhomogene | whether inhomogeneous poly |
在文件SNPStringKernel.cpp第20行定义。
| CSNPStringKernel | ( | CStringFeatures< char > * | l, | |
| CStringFeatures< char > * | r, | |||
| int32_t | degree, | |||
| int32_t | win_len, | |||
| bool | inhomogene | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| degree | degree | |
| win_len | length of local window | |
| inhomogene | whether inhomogeneous poly |
在文件SNPStringKernel.cpp第30行定义。
| ~CSNPStringKernel | ( | ) | [virtual] |
在文件SNPStringKernel.cpp第44行定义。
| 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。
在文件SNPStringKernel.cpp第117行定义。
| virtual EKernelType get_kernel_type | ( | ) | [virtual] |
| char* get_major_base_string | ( | ) |
在文件SNPStringKernel.h第97行定义。
| char* get_minor_base_string | ( | ) |
在文件SNPStringKernel.h第92行定义。
| virtual const char* get_name | ( | ) | const [virtual] |
initialize kernel
| l | features of left-hand side | |
| r | features of right-hand side |
在文件SNPStringKernel.cpp第49行定义。
| void obtain_base_strings | ( | ) |
在文件SNPStringKernel.cpp第62行定义。
| void set_major_base_string | ( | const char * | str | ) |
在文件SNPStringKernel.h第87行定义。
| void set_minor_base_string | ( | const char * | str | ) |
在文件SNPStringKernel.h第82行定义。
int32_t m_degree [protected] |
degree
在文件SNPStringKernel.h第123行定义。
bool m_inhomogene [protected] |
inhomogeneous poly kernel ?
在文件SNPStringKernel.h第128行定义。
int32_t m_str_len [protected] |
total string length / must match length of min/maj strings and string length of each vector
在文件SNPStringKernel.h第132行定义。
char* m_str_maj [protected] |
allele B
在文件SNPStringKernel.h第137行定义。
char* m_str_min [protected] |
allele A
在文件SNPStringKernel.h第135行定义。
int32_t m_win_len [protected] |
window length
在文件SNPStringKernel.h第125行定义。