SHOGUN  v2.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  inline virtual const char* get_name() const { return "RegulatoryModulesStringKernel"; }
79 
86  CDenseFeatures<uint16_t>* positions_lhs, CDenseFeatures<uint16_t>* positions_rhs);
87  /* register the parameters
88  */
89  virtual void register_params();
90 
91  protected:
100  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
101 
109  float64_t compute_wds(char* avec, char* bvec, int32_t len);
110 
111 
113  void set_wd_weights();
114 
115  protected:
118 
120  int32_t degree;
122  int32_t shift;
123 
125  int32_t window;
126 
129 
132 
134  int32_t alen;
136  int32_t blen;
137 
140 
143 };
144 }
145 #endif /* _REGULATORYMODULESSTRINGKERNEL_H__ */

SHOGUN Machine Learning Toolbox - Documentation