12 #ifndef _COMMWORDSTRINGKERNEL_H___
13 #define _COMMWORDSTRINGKERNEL_H___
78 bool use_sign=
false, int32_t size=10);
103 virtual const char*
get_name()
const {
return "CommWordStringKernel"; }
119 int32_t count, int32_t *IDX,
float64_t* weights);
174 int32_t max_degree, int32_t& num_feat, int32_t& num_sym,
175 float64_t* target, int32_t num_suppvec, int32_t* IDX,
187 int32_t &num_feat, int32_t num_suppvec, int32_t* IDX,
230 int32_t idx_a, int32_t idx_b,
bool do_sort);
virtual float64_t compute_optimized(int32_t idx)
void set_use_dict_diagonal_optimization(bool flag)
virtual bool init_optimization(int32_t count, int32_t *IDX, float64_t *weights)
int32_t * dict_diagonal_optimization
virtual bool init_dictionary(int32_t size)
DiceKernelNormalizer performs kernel normalization inspired by the Dice coefficient (see http://en...
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
virtual EFeatureType get_feature_type()
TanimotoKernelNormalizer performs kernel normalization inspired by the Tanimoto coefficient (see http...
float64_t * dictionary_weights
virtual float64_t compute_helper(int32_t idx_a, int32_t idx_b, bool do_sort)
virtual bool delete_optimization()
virtual float64_t compute_diag(int32_t idx_a)
The CommWordString kernel may be used to compute the spectrum kernel from strings that have been mapp...
virtual ~CCommWordStringKernel()
Normalize the kernel by a constant obtained from the first element of the kernel matrix, i.e. .
Normalize the kernel by adding a constant term to its diagonal. This aids kernels to become positive ...
virtual EKernelType get_kernel_type()
virtual bool init(CFeatures *l, CFeatures *r)
virtual void clear_normal()
virtual const char * get_name() const
EFeatureType
shogun feature type
void get_dictionary(int32_t &dsize, float64_t *&dweights)
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 * compute_scoring(int32_t max_degree, int32_t &num_feat, int32_t &num_sym, float64_t *target, int32_t num_suppvec, int32_t *IDX, float64_t *alphas, bool do_init=true)
Normalize the kernel by either a constant or the average value of the diagonal elements (depending on...
The class Features is the base class of all feature objects.
char * compute_consensus(int32_t &num_feat, int32_t num_suppvec, int32_t *IDX, float64_t *alphas)
bool use_dict_diagonal_optimization
virtual void add_to_normal(int32_t idx, float64_t weight)
Template class StringKernel, is the base class of all String Kernels.
VarianceKernelNormalizer divides by the ``variance''.
bool get_use_dict_diagonal_optimization()