SHOGUN  4.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GaussianARDKernel.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) 2015 Wu Lin
8  * Written (W) 2012 Jacob Walker
9  *
10  * Adapted from WeightedDegreeRBFKernel.h
11  */
12 
13 #ifndef GAUSSIANARDKERNEL_H
14 #define GAUSSIANARDKERNEL_H
15 
16 #include <shogun/lib/config.h>
17 
18 #include <shogun/lib/common.h>
21 
22 namespace shogun
23 {
24 
62 {
63 public:
66 
71  virtual void set_width(float64_t w) { m_width=w; }
72 
74  virtual ~CGaussianARDKernel();
75 
81 
86  virtual const char* get_name() const { return "GaussianARDKernel"; }
87 private:
88  void initialize();
89 
90 protected:
93 
94 #ifdef HAVE_LINALG_LIB
95 public:
101  CGaussianARDKernel(int32_t size, float64_t width);
102 
111  int32_t size=10, float64_t width=2.0);
112 
118 
125  virtual bool init(CFeatures* l, CFeatures* r);
126 
137  index_t index=-1);
138 
139 protected:
148  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
149 
161  virtual float64_t distance(int32_t idx_a, int32_t idx_b);
162 
163 #endif /* HAVE_LINALG_LIB */
164 };
165 }
166 #endif /* _GAUSSIANARDKERNEL_H_ */

SHOGUN Machine Learning Toolbox - Documentation