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

CSparseLinearKernel类参考


详细描述

Computes the standard linear kernel on sparse real valued features.

Formally, it computes

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

在文件SparseLinearKernel.h29行定义。

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

所有成员的列表。

公有成员

 CSparseLinearKernel ()
 CSparseLinearKernel (CSparseFeatures< float64_t > *l, CSparseFeatures< float64_t > *r)
virtual ~CSparseLinearKernel ()
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)

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

保护属性

float64_tnormal
int32_t normal_length

构造及析构函数文档

constructor

在文件SparseLinearKernel.cpp20行定义。

constructor

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

在文件SparseLinearKernel.cpp26行定义。

~CSparseLinearKernel (  ) [virtual]

在文件SparseLinearKernel.cpp34行定义。


成员函数文档

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

add to normal

参数:
idxwhere to add
weightwhat to add

重载CKernel

在文件SparseLinearKernel.cpp65行定义。

void cleanup (  ) [virtual]

clean up kernel

重载CKernel

在文件SparseLinearKernel.cpp45行定义。

void clear_normal (  ) [virtual]

clear normal

重载CKernel

在文件SparseLinearKernel.cpp52行定义。

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

在文件SparseLinearKernel.cpp72行定义。

float64_t compute_optimized ( int32_t  idx ) [virtual]

compute optimized

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

重载CKernel

在文件SparseLinearKernel.cpp115行定义。

bool delete_optimization (  ) [virtual]

delete optimization

返回:
if deleting was successful

重载CKernel

在文件SparseLinearKernel.cpp105行定义。

virtual EKernelType get_kernel_type (  ) [virtual]

return what type of kernel we are

返回:
kernel type SPARSELINEAR

实现了CKernel

在文件SparseLinearKernel.h61行定义。

virtual const char* get_name (  ) const [virtual]

return the kernel's name

返回:
name FixedDegree

实现了CSGObject

在文件SparseLinearKernel.h67行定义。

const float64_t* get_normal ( int32_t &  len )

get normal

参数:
lenlength of normal vector will be stored here
返回:
the normal vector

在文件SparseLinearKernel.h108行定义。

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

initialize kernel

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

重载CSparseKernel< float64_t >

在文件SparseLinearKernel.cpp39行定义。

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

在文件SparseLinearKernel.cpp93行定义。


成员数据文档

float64_t* normal [protected]

normal vector (used in case of optimized kernel)

在文件SparseLinearKernel.h127行定义。

int32_t normal_length [protected]

length of normal vector

在文件SparseLinearKernel.h129行定义。


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

SHOGUN Machine Learning Toolbox - Documentation