SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
kernel
WeightedDegreeRBFKernel.h
浏览该文件的文档.
1
#ifndef _WEIGHTEDDEGREERBFKERNEL_H___
2
#define _WEIGHTEDDEGREERBFKERNEL_H___
3
4
#include <
shogun/lib/common.h
>
5
#include <
shogun/kernel/DotKernel.h
>
6
#include <
shogun/features/DenseFeatures.h
>
7
8
namespace
shogun
9
{
10
12
class
CWeightedDegreeRBFKernel
:
public
CDotKernel
13
{
14
public
:
18
CWeightedDegreeRBFKernel
();
19
27
CWeightedDegreeRBFKernel
(int32_t size,
float64_t
width
, int32_t
degree
, int32_t
nof_properties
);
28
38
CWeightedDegreeRBFKernel
(
CDenseFeatures<float64_t>
* l,
CDenseFeatures<float64_t>
* r,
39
float64_t
width, int32_t degree, int32_t nof_properties, int32_t size=10);
40
41
virtual
~CWeightedDegreeRBFKernel
();
42
49
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
50
55
//virtual EKernelType get_kernel_type() { return K_UNKNOWN; }
56
virtual
EKernelType
get_kernel_type
() {
return
K_WEIGHTEDDEGREERBF
; }
57
62
virtual
const
char
*
get_name
()
const
{
return
"WeightedDegreeRBFKernel"
; }
63
64
69
virtual
EFeatureClass
get_feature_class
() {
return
C_DENSE
; }
70
75
virtual
EFeatureType
get_feature_type
() {
return
F_DREAL
; }
76
77
83
inline
bool
set_degree
(int32_t deg) { degree=deg;
return
true
; }
84
89
inline
int32_t
get_degree
() {
return
degree
; }
90
91
protected
:
100
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
101
106
bool
init_wd_weights
();
107
108
protected
:
110
float64_t
width
;
111
113
int32_t
degree
;
114
116
int32_t
nof_properties
;
117
120
float64_t
*
weights
;
121
122
};
123
}
124
#endif
/* _WEIGHTEDDEGREERBFKERNEL_H__ */
SHOGUN
机器学习工具包 - 项目文档