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 |
Protected Attributes | |
float64_t * | ktrain_row_means |
int32_t | num_ktrain |
float64_t * | ktest_row_means |
int32_t | num_ktest |
float64_t | ktrain_mean |
default constructor
Definition at line 46 of file ZeroMeanCenterKernelNormalizer.h.
virtual ~CZeroMeanCenterKernelNormalizer | ( | ) | [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 const char* get_name | ( | void | ) | const [virtual] |
Implements CSGObject.
Definition at line 150 of file ZeroMeanCenterKernelNormalizer.h.
virtual bool init | ( | CKernel * | k | ) | [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.
float64_t* ktest_row_means [protected] |
test row means
Definition at line 160 of file ZeroMeanCenterKernelNormalizer.h.
float64_t ktrain_mean [protected] |
train mean
Definition at line 166 of file ZeroMeanCenterKernelNormalizer.h.
float64_t* ktrain_row_means [protected] |
train row means
Definition at line 154 of file ZeroMeanCenterKernelNormalizer.h.
int32_t num_ktest [protected] |
num k test
Definition at line 163 of file ZeroMeanCenterKernelNormalizer.h.
int32_t num_ktrain [protected] |
num k train
Definition at line 157 of file ZeroMeanCenterKernelNormalizer.h.