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

详细描述

The well known Gaussian kernel (swiss army knife for SVMs) computed on CDotFeatures.

It is computed as

\[ k({\bf x},{\bf x'})= exp(-\frac{||{\bf x}-{\bf x'}||^2}{\tau}) \]

where $\tau$ is the kernel width.

在文件GaussianKernel.h33行定义。

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

所有成员的列表。

公有成员

 CGaussianKernel ()
 CGaussianKernel (int32_t size, float64_t width)
 CGaussianKernel (CDotFeatures *l, CDotFeatures *r, float64_t width, int32_t size=10)
virtual ~CGaussianKernel ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EKernelType get_kernel_type ()
virtual const char * get_name () const
virtual float64_t get_width (void) const

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)
virtual void load_serializable_post (void) throw (ShogunException)

保护属性

float64_t width
float64_tsq_lhs
float64_tsq_rhs

构造及析构函数文档

default constructor

在文件GaussianKernel.cpp20行定义。

CGaussianKernel ( int32_t  size,
float64_t  width 
)

constructor

参数:
sizecache size
widthwidth

在文件GaussianKernel.cpp27行定义。

CGaussianKernel ( CDotFeatures l,
CDotFeatures r,
float64_t  width,
int32_t  size = 10 
)

constructor

参数:
lfeatures of left-hand side
rfeatures of right-hand side
widthwidth
sizecache size

在文件GaussianKernel.cpp34行定义。

~CGaussianKernel ( ) [virtual]

在文件GaussianKernel.cpp44行定义。


成员函数文档

void cleanup ( ) [virtual]

clean up kernel

重载CKernel

在文件GaussianKernel.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

重载CDotKernel

CGaussianShiftKernel重载。

在文件GaussianKernel.cpp81行定义。

virtual EKernelType get_kernel_type ( ) [virtual]

return what type of kernel we are

返回:
kernel type GAUSSIAN

实现了CDotKernel

CGaussianShiftKernel重载。

在文件GaussianKernel.h75行定义。

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

return the kernel's name

返回:
name Gaussian

重载CDotKernel

CGaussianShiftKernel重载。

在文件GaussianKernel.h81行定义。

virtual float64_t get_width ( void  ) const [virtual]

return the kernel's width

返回:
kernel width

在文件GaussianKernel.h87行定义。

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

initialize kernel

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

free sq_{r,l}hs first

重载CDotKernel

在文件GaussianKernel.cpp71行定义。

void load_serializable_post ( void  ) throw (ShogunException) [protected, virtual]

Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.

异常:
ShogunExceptionWill be thrown if an error occurres.

重载CKernel

在文件GaussianKernel.cpp87行定义。


成员数据文档

float64_t* sq_lhs [protected]

squared left-hand side

在文件GaussianKernel.h135行定义。

float64_t* sq_rhs [protected]

squared right-hand side

在文件GaussianKernel.h137行定义。

float64_t width [protected]

width

在文件GaussianKernel.h133行定义。


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

SHOGUN Machine Learning Toolbox - Documentation