公有成员 | 保护属性

CRidgeKernelNormalizer类参考


详细描述

Normalize the kernel by adding a constant term to its diagonal. This aids kernels to become positive definite (even though they are not - often caused by numerical problems).

Formally,

\[ k'(x,x')= \frac{k(x,x')}+ R\cdot {\bf E} \]

where E is a matrix with ones on the diagonal and R is the scalar ridge term. The ridge term R is computed as $R=r\dot c$.

Typically,

In case c <= 0, c is compute as the mean of the kernel diagonal

\[ \mbox{c} = \frac{1}{N}\sum_{i=1}^N k(x_i,x_i) \]

在文件RidgeKernelNormalizer.h43行定义。

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

所有成员的列表。

公有成员

 CRidgeKernelNormalizer (float64_t r=1e-10, float64_t c=0.0)
virtual ~CRidgeKernelNormalizer ()
virtual bool init (CKernel *k)
virtual float64_t normalize (float64_t value, int32_t idx_lhs, int32_t idx_rhs)
virtual float64_t normalize_lhs (float64_t value, int32_t idx_lhs)
virtual float64_t normalize_rhs (float64_t value, int32_t idx_rhs)
virtual const char * get_name () const

保护属性

float64_t ridge
 the constant ridge to be added to the kernel diagonal
float64_t scale
 scaling parameter (avg of diagonal)

构造及析构函数文档

CRidgeKernelNormalizer ( float64_t  r = 1e-10,
float64_t  c = 0.0 
)

constructor

参数:
r ridge parameter
c scale parameter, if <= 0 scaling will be computed from the avg of the kernel diagonal elements

the scalar r*c will be added to the kernel diagonal, typical use cases:

  • r=1e-10 and c=0.0 will add mean(diag(K))*1e-10 to the diagonal
  • r=0.1 and c=1 will add 0.1 to the diagonal

在文件RidgeKernelNormalizer.h56行定义。

virtual ~CRidgeKernelNormalizer (  )  [virtual]

default destructor

在文件RidgeKernelNormalizer.h63行定义。


成员函数文档

virtual const char* get_name (  )  const [virtual]
返回:
object name

实现了CSGObject

在文件RidgeKernelNormalizer.h130行定义。

virtual bool init ( CKernel k  )  [virtual]

initialization of the normalizer (if needed)

参数:
k kernel

实现了CKernelNormalizer

在文件RidgeKernelNormalizer.h69行定义。

virtual float64_t normalize ( float64_t  value,
int32_t  idx_lhs,
int32_t  idx_rhs 
) [virtual]

normalize the kernel value

参数:
value kernel value
idx_lhs index of left hand side vector
idx_rhs index of right hand side vector

实现了CKernelNormalizer

在文件RidgeKernelNormalizer.h100行定义。

virtual float64_t normalize_lhs ( float64_t  value,
int32_t  idx_lhs 
) [virtual]

normalize only the left hand side vector

参数:
value value of a component of the left hand side feature vector
idx_lhs index of left hand side vector

实现了CKernelNormalizer

在文件RidgeKernelNormalizer.h113行定义。

virtual float64_t normalize_rhs ( float64_t  value,
int32_t  idx_rhs 
) [virtual]

normalize only the right hand side vector

参数:
value value of a component of the right hand side feature vector
idx_rhs index of right hand side vector

实现了CKernelNormalizer

在文件RidgeKernelNormalizer.h123行定义。


成员数据文档

float64_t ridge [protected]

the constant ridge to be added to the kernel diagonal

在文件RidgeKernelNormalizer.h134行定义。

float64_t scale [protected]

scaling parameter (avg of diagonal)

在文件RidgeKernelNormalizer.h136行定义。


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

SHOGUN Machine Learning Toolbox - Documentation