SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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 {
61 {
62 public:
65 
70  virtual void set_width(float64_t w) { m_width=w; }
71 
73  virtual ~CGaussianARDKernel();
74 
80 
85  virtual const char* get_name() const { return "GaussianARDKernel"; }
86 private:
87  void initialize();
88 
89 protected:
92 
93 #ifdef HAVE_LINALG_LIB
94 public:
100  CGaussianARDKernel(int32_t size, float64_t width);
101 
110  int32_t size=10, float64_t width=2.0);
111 
117 
124  virtual bool init(CFeatures* l, CFeatures* r);
125 
136  index_t index=-1);
137 
146  const TParameter* param, index_t index=-1);
147 protected:
156  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
157 
169  virtual float64_t distance(int32_t idx_a, int32_t idx_b);
170 
184  virtual float64_t get_parameter_gradient_helper(const TParameter* param,
185  index_t index, int32_t idx_a, int32_t idx_b,
187 
188 #endif /* HAVE_LINALG_LIB */
189 };
190 }
191 #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
float64_t kernel(int32_t idx_a, int32_t idx_b)
Definition: Kernel.h:206
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
virtual bool init(CFeatures *l, CFeatures *r)
Definition: DotKernel.h:65
static CKernel * obtain_from_generic(CSGObject *kernel)
Definition: Kernel.cpp:885
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
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:850
virtual const char * get_name() const
The Kernel base class.
Definition: Kernel.h:158
virtual SGVector< float64_t > get_parameter_gradient_diagonal(const TParameter *param, index_t index=-1)
Definition: Kernel.h:864

SHOGUN Machine Learning Toolbox - Documentation