11 #ifndef _RIDGEKERNELNORMALIZER_H___
12 #define _RIDGEKERNELNORMALIZER_H___
61 SG_ADD(&
scale,
"scale",
"Scale quotient by which kernel is scaled.",
90 for (int32_t i=0; i<num; i++)
108 float64_t value, int32_t idx_lhs, int32_t idx_rhs)
110 if (idx_lhs==idx_rhs)
122 SG_ERROR(
"linadd not supported with Ridge normalization.\n")
132 SG_ERROR(
"linadd not supported with Ridge normalization.\n")
137 virtual const char*
get_name()
const {
return "RidgeKernelNormalizer"; }
146 #endif // _RIDGEKERNELNORMALIZER_H___
CRidgeKernelNormalizer(float64_t r=1e-10, float64_t c=0.0)
virtual float64_t compute(int32_t x, int32_t y)=0
virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs)
float64_t scale
scaling parameter (avg of diagonal)
virtual float64_t normalize(float64_t value, int32_t idx_lhs, int32_t idx_rhs)
virtual bool init(CKernel *k)
virtual int32_t get_num_vec_lhs()
float64_t ridge
the constant ridge to be added to the kernel diagonal
Normalize the kernel by adding a constant term to its diagonal. This aids kernels to become positive ...
The class Kernel Normalizer defines a function to post-process kernel values.
CFeatures * rhs
feature vectors to occur on right hand side
virtual ~CRidgeKernelNormalizer()
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)
virtual const char * get_name() const