SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
kernel
ExponentialKernel.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
* Gaussian Kernel used as template, attribution:
8
* Written (W) 1999-2010 Soeren Sonnenburg
9
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
10
* Copyright (C) 2010 Berlin Institute of Technology
11
*
12
* Slightly edited by Justin Patera 2011
13
*/
14
15
#ifndef _EXPONENTIALKERNEL_H___
16
#define _EXPONENTIALKERNEL_H___
17
18
#include <
shogun/lib/common.h
>
19
#include <
shogun/kernel/DotKernel.h
>
20
#include <
shogun/features/DotFeatures.h
>
21
#include <
shogun/distance/Distance.h
>
22
23
namespace
shogun
24
{
25
class
CDotFeatures;
37
class
CExponentialKernel
:
public
CDotKernel
38
{
39
public
:
43
CExponentialKernel
();
44
53
CExponentialKernel
(
CDotFeatures
* l,
CDotFeatures
* r,
54
float64_t
width,
CDistance
*
distance
, int32_t size);
55
57
virtual
~CExponentialKernel
();
58
65
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
66
68
virtual
void
cleanup
();
69
74
virtual
EKernelType
get_kernel_type
() {
return
K_EXPONENTIAL
; }
75
80
virtual
const
char
*
get_name
()
const
{
return
"ExponentialKernel"
; }
81
86
virtual
float64_t
get_width
()
const
87
{
88
return
m_width
;
89
}
90
91
protected
:
100
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
101
110
virtual
void
load_serializable_post
() throw (
ShogunException
);
111
112
private:
113
void
init();
114
115
protected:
117
CDistance
*
m_distance
;
119
float64_t
m_width
;
120
};
121
}
122
#endif
/* _EXPONENTIALKERNEL_H__ */
SHOGUN
机器学习工具包 - 项目文档