SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
TStudentKernel.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  * Written (W) 2011 Andrew Tereskin
8  * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9  */
10 
11 #include <shogun/lib/config.h>
12 
13 #ifndef TSTUDENTKERNEL_H_
14 #define TSTUDENTKERNEL_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 CTStudentKernel: public CKernel
36 {
37 public:
40 
46  CTStudentKernel(int32_t cache, float64_t d, CDistance* dist);
47 
55 
56  virtual ~CTStudentKernel();
57 
63  virtual bool init(CFeatures* l, CFeatures* r);
64 
68  virtual EKernelType get_kernel_type() { return K_TSTUDENT; }
69 
74 
79 
83  virtual const char* get_name() const { return "TStudentKernel"; }
84 
88  inline float64_t get_degree() { return this->degree; }
89 
93  inline void set_degree(float64_t value) { this->degree = value; }
94 
95 private:
96  void init();
97 
98 protected:
99 
102 
105 
113  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
114 };
115 }
116 
117 #endif /* TSTUDENTKERNEL_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:81
virtual EKernelType get_kernel_type()
virtual bool init(CFeatures *l, CFeatures *r)
Generalized T-Student kernel.
EFeatureClass
shogun feature class
Definition: FeatureTypes.h:38
virtual EFeatureType get_feature_type()
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
float64_t degree
degree parameter of kernel
void set_degree(float64_t value)
double float64_t
Definition: common.h:50
virtual const char * get_name() const
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
CDistance * distance
distance to be used
virtual EFeatureClass get_feature_class()

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