SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
SphericalKernel.h
浏览该文件的文档.
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  * Based on GaussianKernel, Written (W) 1999-2010 Soeren Sonnenburg
8  * Written (W) 2011 Shashwat Lal Das
9  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
10  */
11 
12 #include <shogun/lib/config.h>
13 
14 #ifndef _SPHERICALKERNEL_H__
15 #define _SPHERICALKERNEL_H__
16 
17 #include <shogun/lib/common.h>
18 #include <shogun/kernel/Kernel.h>
20 
21 namespace shogun
22 {
23 
24 class CDistance;
25 
39 {
40  public:
43 
50  CSphericalKernel(int32_t size, float64_t sigma, CDistance* dist);
51 
60 
67  virtual bool init(CFeatures* l, CFeatures* r);
68 
72  virtual EKernelType get_kernel_type() { return K_SPHERICAL; }
73 
78 
83 
87  virtual const char* get_name() const { return "SphericalKernel"; }
88 
93  virtual void set_sigma(float64_t s)
94  {
95  sigma=s;
96  }
97 
102  virtual float64_t get_sigma() const
103  {
104  return sigma;
105  }
106 
107  virtual ~CSphericalKernel();
108 
109 private:
111  void register_params();
112 
113 protected:
114 
117 
120 
130  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
131 };
132 }
133 
134 #endif /* _SPHERICALKERNEL_H__ */
Spherical kernel.
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:81
virtual EKernelType get_kernel_type()
virtual EFeatureType get_feature_type()
EFeatureClass
shogun feature class
Definition: FeatureTypes.h:38
virtual const char * get_name() const
virtual void set_sigma(float64_t s)
virtual float64_t get_sigma() const
double float64_t
Definition: common.h:50
virtual bool init(CFeatures *l, CFeatures *r)
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
The Kernel base class.
Definition: Kernel.h:158
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
virtual EFeatureClass get_feature_class()

SHOGUN 机器学习工具包 - 项目文档