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

CLinearStringKernel类参考


详细描述

Computes the standard linear kernel on dense char valued features.

Formally, it computes

\[ k({\bf x},{\bf x'})= \frac{1}{scale}{\bf x}\cdot {\bf x'} \]

Note: Basically the same as LinearByteKernel but on signed chars.

在文件LinearStringKernel.h29行定义。

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

所有成员的列表。

公有成员

 CLinearStringKernel ()
 CLinearStringKernel (CStringFeatures< char > *l, CStringFeatures< char > *r)
virtual ~CLinearStringKernel ()
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)

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

保护属性

float64_tnormal

构造及析构函数文档

constructor

在文件LinearStringKernel.cpp19行定义。

CLinearStringKernel ( CStringFeatures< char > *  l,
CStringFeatures< char > *  r 
)

constructor

参数:
lfeatures of left-hand side
rfeatures of right-hand side

在文件LinearStringKernel.cpp24行定义。

~CLinearStringKernel (  ) [virtual]

在文件LinearStringKernel.cpp31行定义。


成员函数文档

void add_to_normal ( int32_t  idx,
float64_t  weight 
) [virtual]

add to normal

参数:
idxwhere to add
weightwhat to add

重载CKernel

在文件LinearStringKernel.cpp54行定义。

void cleanup (  ) [virtual]

clean up kernel

重载CKernel

在文件LinearStringKernel.cpp42行定义。

void clear_normal (  ) [virtual]

clear normal

重载CKernel

在文件LinearStringKernel.cpp49行定义。

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

实现了CKernel

在文件LinearStringKernel.cpp66行定义。

float64_t compute_optimized ( int32_t  idx ) [virtual]

compute optimized

参数:
idxindex to compute
返回:
optimized value at given index

重载CKernel

在文件LinearStringKernel.cpp116行定义。

bool delete_optimization (  ) [virtual]

delete optimization

返回:
if deleting was successful

重载CKernel

在文件LinearStringKernel.cpp108行定义。

virtual EKernelType get_kernel_type (  ) [virtual]

return what type of kernel we are

返回:
kernel type LINEAR

实现了CKernel

在文件LinearStringKernel.h60行定义。

virtual const char* get_name (  ) const [virtual]

return the kernel's name

返回:
name Linear

实现了CSGObject

在文件LinearStringKernel.h69行定义。

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

initialize kernel

参数:
lfeatures of left-hand side
rfeatures of right-hand side
返回:
if initializing was successful

重载CStringKernel< char >

在文件LinearStringKernel.cpp36行定义。

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_suppvecnumber of support vectors
sv_idxsupport vector index
alphasalphas
返回:
if optimization was successful

重载CKernel

在文件LinearStringKernel.cpp80行定义。


成员数据文档

float64_t* normal [protected]

normal vector (used in case of optimized kernel)

在文件LinearStringKernel.h118行定义。


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

SHOGUN Machine Learning Toolbox - Documentation