SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CauchyKernel.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) 2011 Sergey Lisitsyn
8  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9  */
10 
11 #include <shogun/lib/config.h>
12 
13 #ifndef CAUCHYKERNEL_H_
14 #define CAUCHYKERNEL_H_
15 
16 #include <shogun/lib/common.h>
17 #include <shogun/kernel/Kernel.h>
19 
20 namespace shogun
21 {
22 
23 class CDistance;
24 
35 class CCauchyKernel: public CKernel
36 {
37 public:
39  CCauchyKernel();
40 
46  CCauchyKernel(int32_t cache, float64_t sigma, CDistance* dist);
47 
54  CCauchyKernel(CFeatures *l, CFeatures *r, float64_t sigma, CDistance* dist);
55 
61  virtual bool init(CFeatures* l, CFeatures* r);
62 
66  virtual EKernelType get_kernel_type() { return K_CAUCHY; }
67 
72 
77 
81  virtual const char* get_name() const { return "CauchyKernel"; }
82 
83  virtual ~CCauchyKernel();
84 
85 protected:
86 
94  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
95 
96 private:
97 
98  void init();
99 
100 protected:
101 
104 
107 
108 };
109 
110 }
111 
112 #endif /* CAUCHYKERNEL_H_ */
virtual EFeatureClass get_feature_class()=0
EKernelType
Definition: Kernel.h:57
Class Distance, a base class for all the distances used in the Shogun toolbox.
Definition: Distance.h:87
virtual EKernelType get_kernel_type()
Definition: CauchyKernel.h:66
virtual const char * get_name() const
Definition: CauchyKernel.h:81
float64_t m_sigma
sigma parameter of kernel
Definition: CauchyKernel.h:106
EFeatureClass
shogun feature class
Definition: FeatureTypes.h:38
double float64_t
Definition: common.h:50
EFeatureType
shogun feature type
Definition: FeatureTypes.h:19
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 EFeatureType get_feature_type()=0
virtual EFeatureType get_feature_type()
Definition: CauchyKernel.h:71
CDistance * m_distance
distance to be used
Definition: CauchyKernel.h:103
virtual bool init(CFeatures *l, CFeatures *r)
The Kernel base class.
Definition: Kernel.h:159
Cauchy kernel.
Definition: CauchyKernel.h:35
virtual EFeatureClass get_feature_class()
Definition: CauchyKernel.h:76
virtual float64_t compute(int32_t idx_a, int32_t idx_b)

SHOGUN Machine Learning Toolbox - Documentation