11 #ifndef _ZEROMEANCENTERKERNELNORMALIZER_H___
12 #define _ZEROMEANCENTERKERNELNORMALIZER_H___
53 "num_ktrain",
"Train row means.");
55 "num_ktest",
"Test row means.");
92 for (int32_t i=0;i<num_lhs;i++)
107 float64_t value, int32_t idx_lhs, int32_t idx_rhs)
119 SG_ERROR(
"normalize_lhs not implemented")
129 SG_ERROR(
"normalize_rhs not implemented")
142 for (int32_t i=0; i<num_rhs; i++)
145 for (int32_t j=0; j<num_lhs; j++)
146 v[i] += ( k->
compute(j,i)/num_lhs );
152 virtual const char*
get_name()
const {
return "ZeroMeanCenterKernelNormalizer"; }
virtual float64_t compute(int32_t x, int32_t y)=0
virtual bool init(CKernel *k)
virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs)
virtual ~CZeroMeanCenterKernelNormalizer()
virtual int32_t get_num_vec_lhs()
virtual const char * get_name() const
CZeroMeanCenterKernelNormalizer()
float64_t * ktest_row_means
virtual float64_t normalize(float64_t value, int32_t idx_lhs, int32_t idx_rhs)
float64_t * ktrain_row_means
The class Kernel Normalizer defines a function to post-process kernel values.
ZeroMeanCenterKernelNormalizer centers the kernel in feature space.
virtual int32_t get_num_vec_rhs()
bool alloc_and_compute_row_means(CKernel *k, float64_t *&v, int32_t num_lhs, int32_t num_rhs)
CFeatures * rhs
feature vectors to occur on right hand side
void add_vector(bool **param, index_t *length, const char *name, const char *description="")
all of classes and functions are contained in the shogun namespace
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)