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 init();
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_ */
float distance(CJLCoverTreePoint p1, CJLCoverTreePoint p2, float64_t upper_bound)
virtual EKernelType get_kernel_type()
EKernelType
Definition: Kernel.h:57
int32_t index_t
Definition: common.h:62
Linear Kernel with Automatic Relevance Detection computed on CDotFeatures.
parameter struct
Definition: Parameter.h:32
float64_t kernel(int32_t idx_a, int32_t idx_b)
Definition: Kernel.h:205
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
Definition: DotKernel.h:123
Features that support dot products among other operations.
Definition: DotFeatures.h:44
Gaussian Kernel with Automatic Relevance Detection computed on CDotFeatures.
virtual void set_width(float64_t w)
double float64_t
Definition: common.h:50
static CKernel * obtain_from_generic(CSGObject *kernel)
Definition: Kernel.cpp:883
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual SGMatrix< float64_t > get_parameter_gradient(const TParameter *param, index_t index=-1)
Definition: Kernel.h:851
virtual const char * get_name() const
The Kernel base class.
Definition: Kernel.h:157

SHOGUN Machine Learning Toolbox - Documentation