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

详细描述

ZeroMeanCenterKernelNormalizer centers the kernel in feature space.

After centering, each feature must have zero mean. The centered kernel matrix can be expressed in terms of the non-centered version.

Denoting the mapping from input space to feature space by $\phi:\mathcal{X}\rightarrow\mathcal{F}$, the centered square kernel matrix $K_c$ (with dimensionality $ M $)

can be expressed in terms of the original matrix $K$ as follows:

\begin{eqnarray*} k({\bf x}_i,{\bf x}_j)_c & = & \left(\phi({\bf x}_i) - \frac{1}{m} \sum_{p=1}^M \phi({\bf x}_p)\right) \cdot \left(\phi({\bf x}_j) - \frac{1}{M} \sum_{q=1}^M \phi({\bf x}_q)\right) \\ & = & K_{ij} - \frac{1}{M} \sum_{p=1}^M K_{pj} - \frac{1}{M} \sum_{q=1}^M K_{iq} + \frac{1}{M^2} \sum_{p=1}^M \sum_{q=1}^M K_{pq} \\ & = & (K - 1_M K - K 1_M + 1_M K 1_M)_{ij} \end{eqnarray*}

Additionally, let $ K^{t} $ be the $ L \times M $ test matrix describing the similarity between a $ L $ test instances with $M$ training instances

(defined by a $ M x M $ kernel matrix $ K$), the centered testing set kernel matrix is given by

\[ K_{c}^t = (K - 1'_M K - K^{t} 1_M + 1'_M K 1_M) \]

在文件ZeroMeanCenterKernelNormalizer.h41行定义。

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

所有成员的列表。

公有成员

 CZeroMeanCenterKernelNormalizer ()
virtual ~CZeroMeanCenterKernelNormalizer ()
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)
bool alloc_and_compute_row_means (CKernel *k, float64_t *&v, int32_t num_lhs, int32_t num_rhs)
virtual const char * get_name () const

保护属性

float64_tktrain_row_means
int32_t num_ktrain
float64_tktest_row_means
int32_t num_ktest
float64_t ktrain_mean

构造及析构函数文档

default constructor

在文件ZeroMeanCenterKernelNormalizer.h46行定义。

virtual ~CZeroMeanCenterKernelNormalizer ( ) [virtual]

default destructor

在文件ZeroMeanCenterKernelNormalizer.h57行定义。


成员函数文档

bool alloc_and_compute_row_means ( CKernel k,
float64_t *&  v,
int32_t  num_lhs,
int32_t  num_rhs 
)

alloc and compute the vector containing the row margins of all rows for a kernel matrix.

在文件ZeroMeanCenterKernelNormalizer.h135行定义。

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

实现了CSGObject

在文件ZeroMeanCenterKernelNormalizer.h150行定义。

virtual bool init ( CKernel k) [virtual]

initialization of the normalizer

参数:
kkernel

实现了CKernelNormalizer

在文件ZeroMeanCenterKernelNormalizer.h65行定义。

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

normalize the kernel value

参数:
valuekernel value
idx_lhsindex of left hand side vector
idx_rhsindex of right hand side vector

实现了CKernelNormalizer

在文件ZeroMeanCenterKernelNormalizer.h104行定义。

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

normalize only the left hand side vector

参数:
valuevalue of a component of the left hand side feature vector
idx_lhsindex of left hand side vector

实现了CKernelNormalizer

在文件ZeroMeanCenterKernelNormalizer.h115行定义。

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

normalize only the right hand side vector

参数:
valuevalue of a component of the right hand side feature vector
idx_rhsindex of right hand side vector

实现了CKernelNormalizer

在文件ZeroMeanCenterKernelNormalizer.h125行定义。


成员数据文档

float64_t* ktest_row_means [protected]

在文件ZeroMeanCenterKernelNormalizer.h156行定义。

float64_t ktrain_mean [protected]

在文件ZeroMeanCenterKernelNormalizer.h159行定义。

在文件ZeroMeanCenterKernelNormalizer.h153行定义。

int32_t num_ktest [protected]

在文件ZeroMeanCenterKernelNormalizer.h157行定义。

int32_t num_ktrain [protected]

在文件ZeroMeanCenterKernelNormalizer.h154行定义。


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

SHOGUN Machine Learning Toolbox - Documentation