SHOGUN v0.9.0
公有成员 | 保护属性
CLinearKernel类参考

详细描述

Computes the standard linear kernel on CDotFeatures.

Formally, it computes

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

在文件LinearKernel.h31行定义。

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

所有成员的列表。

公有成员

 CLinearKernel ()
 CLinearKernel (CDotFeatures *l, CDotFeatures *r)
virtual ~CLinearKernel ()
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_tget_normal (int32_t &len)
void get_w (float64_t **dst_w, int32_t *dst_dims)
void set_w (float64_t *src_w, int32_t src_w_dim)

保护属性

float64_tnormal
int32_t normal_length

构造及析构函数文档

constructor

在文件LinearKernel.cpp20行定义。

constructor

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

在文件LinearKernel.cpp26行定义。

~CLinearKernel ( ) [virtual]

在文件LinearKernel.cpp33行定义。


成员函数文档

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

add to normal vector

参数:
idxwhere to add
weightwhat to add

重载CKernel

在文件LinearKernel.cpp66行定义。

void cleanup ( ) [virtual]

clean up kernel

重载CKernel

在文件LinearKernel.cpp45行定义。

void clear_normal ( ) [virtual]

clear normal vector

重载CKernel

在文件LinearKernel.cpp52行定义。

float64_t compute_optimized ( int32_t  idx) [virtual]

compute optimized

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

重载CKernel

在文件LinearKernel.cpp95行定义。

bool delete_optimization ( ) [virtual]

delete optimization

返回:
if deleting was successful

重载CKernel

在文件LinearKernel.cpp85行定义。

virtual EKernelType get_kernel_type ( ) [virtual]

return what type of kernel we are

返回:
kernel type LINEAR

实现了CDotKernel

在文件LinearKernel.h62行定义。

virtual const char* get_name ( void  ) const [virtual]

return the kernel's name

返回:
name Lineaer

重载CDotKernel

在文件LinearKernel.h68行定义。

const float64_t* get_normal ( int32_t &  len)

get normal

参数:
lenwhere length of normal vector will be stored
返回:
normal vector

在文件LinearKernel.h109行定义。

void get_w ( float64_t **  dst_w,
int32_t *  dst_dims 
)

get normal vector (swig compatible)

参数:
dst_wstore w in this argument
dst_dimsdimension of w

在文件LinearKernel.h128行定义。

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

initialize kernel

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

重载CDotKernel

在文件LinearKernel.cpp38行定义。

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

在文件LinearKernel.cpp73行定义。

void set_w ( float64_t src_w,
int32_t  src_w_dim 
)

set normal vector (swig compatible)

参数:
src_wnew w
src_w_dimdimension of new w - must fit dim of lhs

在文件LinearKernel.h144行定义。


成员数据文档

float64_t* normal [protected]

normal vector (used in case of optimized kernel)

在文件LinearKernel.h153行定义。

int32_t normal_length [protected]

length of normal vector

在文件LinearKernel.h155行定义。


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

SHOGUN Machine Learning Toolbox - Documentation