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

CLinearKernel类参考


详细描述

Computes the standard linear kernel on dense real valued features.

Formally, it computes

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

在文件LinearKernel.h28行定义。

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

所有成员的列表。

公有成员

 CLinearKernel ()
 CLinearKernel (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *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)

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

保护属性

float64_tnormal
int32_t normal_length

构造及析构函数文档

constructor

在文件LinearKernel.cpp19行定义。

constructor

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

在文件LinearKernel.cpp25行定义。

~CLinearKernel (  ) [virtual]

在文件LinearKernel.cpp32行定义。


成员函数文档

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

add to normal vector

参数:
idxwhere to add
weightwhat to add

重载CKernel

在文件LinearKernel.cpp65行定义。

void cleanup (  ) [virtual]

clean up kernel

重载CKernel

在文件LinearKernel.cpp44行定义。

void clear_normal (  ) [virtual]

clear normal vector

重载CKernel

在文件LinearKernel.cpp51行定义。

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

在文件LinearKernel.cpp72行定义。

float64_t compute_optimized ( int32_t  idx ) [virtual]

compute optimized

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

重载CKernel

在文件LinearKernel.cpp114行定义。

bool delete_optimization (  ) [virtual]

delete optimization

返回:
if deleting was successful

重载CKernel

在文件LinearKernel.cpp104行定义。

virtual EKernelType get_kernel_type (  ) [virtual]

return what type of kernel we are

返回:
kernel type LINEAR

实现了CKernel

在文件LinearKernel.h59行定义。

virtual const char* get_name (  ) const [virtual]

return the kernel's name

返回:
name Lineaer

实现了CSGObject

在文件LinearKernel.h65行定义。

const float64_t* get_normal ( int32_t &  len )

get normal

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

在文件LinearKernel.h106行定义。

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

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

initialize kernel

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

重载CSimpleKernel< float64_t >

在文件LinearKernel.cpp37行定义。

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

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


成员数据文档

float64_t* normal [protected]

normal vector (used in case of optimized kernel)

在文件LinearKernel.h161行定义。

int32_t normal_length [protected]

length of normal vector

在文件LinearKernel.h163行定义。


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

SHOGUN Machine Learning Toolbox - Documentation