11 #ifndef _SQRTDIAGKERNELNORMALIZER_H___
12 #define _SQRTDIAGKERNELNORMALIZER_H___
44 "sqrt(K(x,x)) for left hand side examples.");
46 "sqrt(K(x,x)) for right hand side examples.");
48 "use_optimized_diagonal_computation",
92 float64_t value, int32_t idx_lhs, int32_t idx_rhs)
95 return value/sqrt_both;
126 for (int32_t i=0; i<num; i++)
146 virtual const char*
get_name()
const {
return "SqrtDiagKernelNormalizer"; }
virtual float64_t compute(int32_t x, int32_t y)=0
bool alloc_and_compute_diag(CKernel *k, float64_t *&v, int32_t num)
virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs)
virtual int32_t get_num_vec_lhs()
virtual float64_t normalize(float64_t value, int32_t idx_lhs, int32_t idx_rhs)
The CommWordString kernel may be used to compute the spectrum kernel from strings that have been mapp...
virtual bool init(CKernel *k)
The class Kernel Normalizer defines a function to post-process kernel values.
virtual int32_t get_num_vec_rhs()
virtual const char * get_name() const
CFeatures * rhs
feature vectors to occur on right hand side
void add_vector(bool **param, index_t *length, const char *name, const char *description="")
SqrtDiagKernelNormalizer divides by the Square Root of the product of the diagonal elements...
all of classes and functions are contained in the shogun namespace
virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)
virtual EKernelType get_kernel_type()=0
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
CSqrtDiagKernelNormalizer(bool use_opt_diag=false)
bool use_optimized_diagonal_computation
virtual ~CSqrtDiagKernelNormalizer()