SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RegulatoryModulesStringKernel.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) 2009 Sebastian J. Schultheiss and Soeren Sonnenburg
8  * Copyright (C) 2009 Max-Planck-Society
9  */
10 
11 #ifndef _REGULATORYMODULESSTRINGKERNEL_H___
12 #define _REGULATORYMODULESSTRINGKERNEL_H___
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
19 
20 namespace shogun
21 {
28 {
29  public:
32 
41  CRegulatoryModulesStringKernel(int32_t size, float64_t width, int32_t degree, int32_t shift, int32_t window);
42 
57  float64_t width, int32_t degree, int32_t shift, int32_t window, int32_t size=10);
58 
61 
68  virtual bool init(CFeatures* l, CFeatures* r);
69 
75 
80  virtual const char* get_name() const { return "RegulatoryModulesStringKernel"; }
81 
88  CDenseFeatures<uint16_t>* positions_lhs, CDenseFeatures<uint16_t>* positions_rhs);
89 
90  protected:
99  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
100 
108  float64_t compute_wds(char* avec, char* bvec, int32_t len);
109 
110 
112  void set_wd_weights();
113 
114  private:
116  void init();
117 
118  protected:
121 
123  int32_t degree;
125  int32_t shift;
126 
128  int32_t window;
129 
132 
135 
138 
141 };
142 }
143 #endif /* _REGULATORYMODULESSTRINGKERNEL_H__ */
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
EKernelType
Definition: Kernel.h:57
virtual bool init(CFeatures *l, CFeatures *r)
float64_t compute_wds(char *avec, char *bvec, int32_t len)
double float64_t
Definition: common.h:50
The Regulaty Modules kernel, based on the WD kernel, as published in Schultheiss et al...
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
void set_motif_positions(CDenseFeatures< uint16_t > *positions_lhs, CDenseFeatures< uint16_t > *positions_rhs)
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