|
SHOGUN
v1.1.0
|
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
, the centered square kernel matrix
(with dimensionality
)
can be expressed in terms of the original matrix
as follows:
Additionally, let
be the
test matrix describing the similarity between a
test instances with
training instances
(defined by a
kernel matrix
), the centered testing set kernel matrix is given by
Definition at line 41 of file ZeroMeanCenterKernelNormalizer.h.

Public Member Functions | |
| 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 |
Public Member Functions inherited from CKernelNormalizer | |
| CKernelNormalizer () | |
| virtual | ~CKernelNormalizer () |
| virtual void | register_params () |
| ENormalizerType | get_normalizer_type () |
| void | set_normalizer_type (ENormalizerType type) |
Public Member Functions inherited from CSGObject | |
| CSGObject () | |
| CSGObject (const CSGObject &orig) | |
| virtual | ~CSGObject () |
| virtual bool | is_generic (EPrimitiveType *generic) const |
| template<class T > | |
| void | set_generic () |
| void | unset_generic () |
| virtual void | print_serializable (const char *prefix="") |
| virtual bool | save_serializable (CSerializableFile *file, const char *prefix="") |
| virtual bool | load_serializable (CSerializableFile *file, const char *prefix="") |
| void | set_global_io (SGIO *io) |
| SGIO * | get_global_io () |
| void | set_global_parallel (Parallel *parallel) |
| Parallel * | get_global_parallel () |
| void | set_global_version (Version *version) |
| Version * | get_global_version () |
| SGVector< char * > | get_modelsel_names () |
| char * | get_modsel_param_descr (const char *param_name) |
| index_t | get_modsel_param_index (const char *param_name) |
Protected Attributes | |
| float64_t * | ktrain_row_means |
| int32_t | num_ktrain |
| float64_t * | ktest_row_means |
| int32_t | num_ktest |
| float64_t | ktrain_mean |
Protected Attributes inherited from CKernelNormalizer | |
| ENormalizerType | m_type |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_model_selection_parameters |
Protected Member Functions inherited from CSGObject | |
| virtual void | load_serializable_pre () throw (ShogunException) |
| virtual void | load_serializable_post () throw (ShogunException) |
| virtual void | save_serializable_pre () throw (ShogunException) |
| virtual void | save_serializable_post () throw (ShogunException) |
default constructor
Definition at line 46 of file ZeroMeanCenterKernelNormalizer.h.
|
virtual |
default destructor
Definition at line 57 of file ZeroMeanCenterKernelNormalizer.h.
alloc and compute the vector containing the row margins of all rows for a kernel matrix.
Definition at line 135 of file ZeroMeanCenterKernelNormalizer.h.
|
virtual |
Implements CSGObject.
Definition at line 150 of file ZeroMeanCenterKernelNormalizer.h.
|
virtual |
initialization of the normalizer
| k | kernel |
Implements CKernelNormalizer.
Definition at line 65 of file ZeroMeanCenterKernelNormalizer.h.
normalize the kernel value
| value | kernel value |
| idx_lhs | index of left hand side vector |
| idx_rhs | index of right hand side vector |
Implements CKernelNormalizer.
Definition at line 104 of file ZeroMeanCenterKernelNormalizer.h.
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 |
Implements CKernelNormalizer.
Definition at line 115 of file ZeroMeanCenterKernelNormalizer.h.
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 |
Implements CKernelNormalizer.
Definition at line 125 of file ZeroMeanCenterKernelNormalizer.h.
|
protected |
test row means
Definition at line 160 of file ZeroMeanCenterKernelNormalizer.h.
|
protected |
train mean
Definition at line 166 of file ZeroMeanCenterKernelNormalizer.h.
|
protected |
train row means
Definition at line 154 of file ZeroMeanCenterKernelNormalizer.h.
|
protected |
num k test
Definition at line 163 of file ZeroMeanCenterKernelNormalizer.h.
|
protected |
num k train
Definition at line 157 of file ZeroMeanCenterKernelNormalizer.h.