SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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/common.h>
17 
18 namespace shogun
19 {
26 {
27  public:
30 
39  CRegulatoryModulesStringKernel(int32_t size, float64_t width, int32_t degree, int32_t shift, int32_t window);
40 
55  float64_t width, int32_t degree, int32_t shift, int32_t window, int32_t size=10);
56 
59 
66  virtual bool init(CFeatures* l, CFeatures* r);
67 
73 
78  virtual const char* get_name() const { return "RegulatoryModulesStringKernel"; }
79 
86  CDenseFeatures<uint16_t>* positions_lhs, CDenseFeatures<uint16_t>* positions_rhs);
87 
88  protected:
97  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
98 
106  float64_t compute_wds(char* avec, char* bvec, int32_t len);
107 
108 
110  void set_wd_weights();
111 
112  private:
114  void init();
115 
116  protected:
119 
121  int32_t degree;
123  int32_t shift;
124 
126  int32_t window;
127 
130 
133 
136 
139 };
140 }
141 #endif /* _REGULATORYMODULESSTRINGKERNEL_H__ */

SHOGUN Machine Learning Toolbox - Documentation