SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
SubsequenceStringKernel.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2014 Soumyajit De
8  */
9 
10 #ifndef SUBSEQUENCE_STRING_KERNEL_H_
11 #define SUBSEQUENCE_STRING_KERNEL_H_
12 
13 #include <shogun/lib/config.h>
14 
15 #include <shogun/lib/common.h>
17 
18 namespace shogun
19 {
56 {
57 public:
60 
68  CSubsequenceStringKernel(int32_t size, int32_t maxlen, float64_t lambda);
69 
79  int32_t maxlen, float64_t lambda);
80 
82  virtual ~CSubsequenceStringKernel();
83 
91  virtual bool init(CFeatures* lhs, CFeatures* rhs);
92 
94  virtual void cleanup();
95 
98  {
99  return K_POLYMATCH;
100  }
101 
103  virtual const char* get_name() const
104  {
105  return "SubsequenceStringKernel";
106  }
107 
109  virtual void register_params();
110 
133  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
134 
135 protected:
137  int32_t m_maxlen;
138 
141 };
142 
143 }
144 #endif // SUBSEQUENCE_STRING_KERNEL_H_
EKernelType
Definition: Kernel.h:57
virtual bool init(CFeatures *lhs, CFeatures *rhs)
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
double float64_t
Definition: common.h:50
virtual const char * get_name() const
CFeatures * rhs
feature vectors to occur on right hand side
Definition: Kernel.h:1062
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
class SubsequenceStringKernel that implements String Subsequence Kernel (SSK) discussed by Lodhi et...
CFeatures * lhs
feature vectors to occur on left hand side
Definition: Kernel.h:1060
The class Features is the base class of all feature objects.
Definition: Features.h:68
Template class StringKernel, is the base class of all String Kernels.
Definition: StringKernel.h:26

SHOGUN Machine Learning Toolbox - Documentation