公有成员 | 保护成员 | 保护属性

CSNPStringKernel类参考


详细描述

The class SNPStringKernel computes a variant of the polynomial kernel on strings of same length.

It is computed as FIXME

\[ k({\bf x},{\bf x'})= (\sum_{i=0}^{L-1} I(x_i=x'_i)+c)^d \]

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.

\[ k'({\bf x}, {\bf x'})=\frac{k({\bf x}, {\bf x'})}{\sqrt{k({\bf x}, {\bf x})k({\bf x'}, {\bf x'})}} \]

在文件SNPStringKernel.h36行定义。

继承图,类CSNPStringKernel
Inheritance graph
[图例]

所有成员的列表。

公有成员

 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.cpp20行定义。

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.cpp30行定义。

~CSNPStringKernel (  )  [virtual]

在文件SNPStringKernel.cpp44行定义。


成员函数文档

void cleanup (  )  [virtual]

clean up kernel

重载CKernel

在文件SNPStringKernel.cpp55行定义。

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
返回:
computed kernel function at indices a,b

实现了CKernel

在文件SNPStringKernel.cpp117行定义。

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

返回:
kernel type POLYMATCH

实现了CKernel

在文件SNPStringKernel.h77行定义。

char* get_major_base_string (  ) 

在文件SNPStringKernel.h97行定义。

char* get_minor_base_string (  ) 

在文件SNPStringKernel.h92行定义。

virtual const char* get_name (  )  const [virtual]

return the kernel's name

返回:
name PolyMatchString

实现了CSGObject

在文件SNPStringKernel.h108行定义。

bool init ( CFeatures l,
CFeatures r 
) [virtual]

initialize kernel

参数:
l features of left-hand side
r features of right-hand side
返回:
if initializing was successful

重载CStringKernel< char >

在文件SNPStringKernel.cpp49行定义。

void obtain_base_strings (  ) 

在文件SNPStringKernel.cpp62行定义。

void set_major_base_string ( const char *  str  ) 

在文件SNPStringKernel.h87行定义。

void set_minor_base_string ( const char *  str  ) 

在文件SNPStringKernel.h82行定义。


成员数据文档

int32_t m_degree [protected]

degree

在文件SNPStringKernel.h123行定义。

bool m_inhomogene [protected]

inhomogeneous poly kernel ?

在文件SNPStringKernel.h128行定义。

int32_t m_str_len [protected]

total string length / must match length of min/maj strings and string length of each vector

在文件SNPStringKernel.h132行定义。

char* m_str_maj [protected]

allele B

在文件SNPStringKernel.h137行定义。

char* m_str_min [protected]

allele A

在文件SNPStringKernel.h135行定义。

int32_t m_win_len [protected]

window length

在文件SNPStringKernel.h125行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation