SHOGUN  6.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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 {
60 {
61 public:
64 
66  virtual ~CGaussianARDKernel();
67 
73 
78  virtual const char* get_name() const { return "GaussianARDKernel"; }
79 private:
80  void init();
81 
82 protected:
94  virtual float64_t distance(int32_t idx_a, int32_t idx_b);
95 
96 public:
102  CGaussianARDKernel(int32_t size);
103 
112  int32_t size=10);
113 
119 
126  virtual bool init(CFeatures* l, CFeatures* r);
127 
138  index_t index=-1);
139 
148  const TParameter* param, index_t index=-1);
149 
150 protected:
154  virtual void precompute_squared();
155 
163 
168 
176  SGVector<float64_t>bvec);
177 
188  float64_t scale, index_t index);
189 
190 
205  index_t index, int32_t idx_a, int32_t idx_b,
207 };
208 }
209 #endif /* _GAUSSIANARDKERNEL_H_ */
virtual SGMatrix< float64_t > get_parameter_gradient(const TParameter *param, index_t index=-1)
virtual float64_t compute_gradient_helper(SGVector< float64_t > avec, SGVector< float64_t > bvec, float64_t scale, index_t index)
virtual EKernelType get_kernel_type()
int32_t index_t
Definition: common.h:72
virtual float64_t distance(int32_t idx_a, int32_t idx_b)
virtual SGVector< float64_t > get_parameter_gradient_diagonal(const TParameter *param, index_t index=-1)
SGVector< float64_t > m_sq_rhs
static CGaussianARDKernel * obtain_from_generic(CKernel *kernel)
void scale(SGVector< T > &a, SGVector< T > &result, T alpha=1)
parameter struct
float64_t kernel(int32_t idx_a, int32_t idx_b)
virtual float64_t get_parameter_gradient_helper(const TParameter *param, index_t index, int32_t idx_a, int32_t idx_b, SGVector< float64_t > avec, SGVector< float64_t > bvec)
Features that support dot products among other operations.
Definition: DotFeatures.h:44
Gaussian Kernel with Automatic Relevance Detection computed on CDotFeatures.
virtual float64_t compute_helper(SGVector< float64_t > avec, SGVector< float64_t >bvec)
double float64_t
Definition: common.h:60
SGVector< float64_t > m_sq_lhs
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 const char * get_name() const
The Kernel base class.
virtual SGVector< float64_t > precompute_squared_helper(CDotFeatures *df)
Exponential Kernel with Automatic Relevance Detection computed on CDotFeatures.

SHOGUN Machine Learning Toolbox - Documentation