11 #ifndef _DICEKERNELNORMALIZER_H___
12 #define _DICEKERNELNORMALIZER_H___
40 "K(x,x) for left hand side examples.");
42 "K(x,x) for right hand side examples.");
44 "use_optimized_diagonal_computation",
88 float64_t value, int32_t idx_lhs, int32_t idx_rhs)
91 return 2*value/diag_sum;
100 SG_ERROR(
"linadd not supported with Dice normalization.\n")
110 SG_ERROR(
"linadd not supported with Dice normalization.\n")
120 return "DiceKernelNormalizer"; }
132 for (int32_t i=0; i<num; i++)
virtual float64_t compute(int32_t x, int32_t y)=0
DiceKernelNormalizer performs kernel normalization inspired by the Dice coefficient (see http://en...
virtual int32_t get_num_vec_lhs()
The CommWordString kernel may be used to compute the spectrum kernel from strings that have been mapp...
CDiceKernelNormalizer(bool use_opt_diag=false)
bool use_optimized_diagonal_computation
virtual ~CDiceKernelNormalizer()
The class Kernel Normalizer defines a function to post-process kernel values.
bool alloc_and_compute_diag(CKernel *k, float64_t *&v, int32_t num)
virtual int32_t get_num_vec_rhs()
virtual float64_t normalize(float64_t value, int32_t idx_lhs, int32_t idx_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
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.
virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs)
virtual const char * get_name() const
virtual bool init(CKernel *k)
virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)