11 #ifndef _FIRSTELEMENTKERNELNORMALIZER_H___
12 #define _FIRSTELEMENTKERNELNORMALIZER_H___
37 SG_ADD(&
scale,
"scale",
"Scale quotient by which kernel is scaled.",
69 float64_t value, int32_t idx_lhs, int32_t idx_rhs)
80 return value/sqrt(
scale);
89 return value/sqrt(
scale);
93 virtual const char*
get_name()
const {
return "FirstElementKernelNormalizer"; }
virtual const char * get_name() const
virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)
virtual float64_t compute(int32_t x, int32_t y)=0
CFirstElementKernelNormalizer()
virtual ~CFirstElementKernelNormalizer()
Normalize the kernel by a constant obtained from the first element of the kernel matrix, i.e. .
The class Kernel Normalizer defines a function to post-process kernel values.
CFeatures * rhs
feature vectors to occur on right hand side
all of classes and functions are contained in the shogun namespace
virtual float64_t normalize(float64_t value, int32_t idx_lhs, int32_t idx_rhs)
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_lhs(float64_t value, int32_t idx_lhs)
virtual bool init(CKernel *k)
float64_t scale
scale constant obtained from k(0,0)