11 #ifndef _TANIMOTOKERNELNORMALIZER_H___
12 #define _TANIMOTOKERNELNORMALIZER_H___
81 float64_t value, int32_t idx_lhs, int32_t idx_rhs)
84 return value/(diag_sum-value);
93 SG_ERROR(
"linadd not supported with Tanimoto normalization.\n")
103 SG_ERROR(
"linadd not supported with Tanimoto normalization.\n")
113 return "TanimotoKernelNormalizer"; }
125 for (int32_t i=0; i<num; i++)
virtual const char * get_name() const
bool use_optimized_diagonal_computation
virtual float64_t compute(int32_t x, int32_t y)=0
CTanimotoKernelNormalizer(bool use_opt_diag=false)
TanimotoKernelNormalizer performs kernel normalization inspired by the Tanimoto coefficient (see http...
virtual int32_t get_num_vec_lhs()
virtual ~CTanimotoKernelNormalizer()
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 float64_t normalize_rhs(float64_t value, int32_t idx_rhs)
CFeatures * rhs
feature vectors to occur on right hand side
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 float64_t normalize(float64_t value, int32_t idx_lhs, int32_t idx_rhs)
bool alloc_and_compute_diag(CKernel *k, float64_t *&v, int32_t num)