SHOGUN  v3.2.0
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__ */
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
EKernelType
Definition: Kernel.h:51
virtual bool init(CFeatures *l, CFeatures *r)
float64_t compute_wds(char *avec, char *bvec, int32_t len)
double float64_t
Definition: common.h:48
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:16
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:62
Template class StringKernel, is the base class of all String Kernels.
Definition: StringKernel.h:24

SHOGUN Machine Learning Toolbox - Documentation