SHOGUN
4.1.0
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
kernel
DiagKernel.cpp
浏览该文件的文档.
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) 1999-2009 Soeren Sonnenburg
8
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9
*/
10
11
#include <
shogun/lib/config.h
>
12
#include <
shogun/lib/common.h
>
13
#include <
shogun/io/SGIO.h
>
14
15
#include <
shogun/base/Parameter.h
>
16
#include <
shogun/kernel/DiagKernel.h
>
17
18
using namespace
shogun
;
19
20
CDiagKernel::CDiagKernel
()
21
:
CKernel
()
22
{
23
init
();
24
}
25
26
CDiagKernel::CDiagKernel
(int32_t size,
float64_t
d)
27
:
CKernel
(size)
28
{
29
init
();
30
diag
=d;
31
}
32
33
CDiagKernel::CDiagKernel
(
CFeatures
* l,
CFeatures
* r,
float64_t
d)
34
:
CKernel
()
35
{
36
init
();
37
diag
=d;
38
init
(l, r);
39
}
40
41
CDiagKernel::~CDiagKernel
()
42
{
43
}
44
45
bool
CDiagKernel::init(
CFeatures
* l,
CFeatures
* r)
46
{
47
CKernel::init(l, r);
48
return
init_normalizer
();
49
}
50
51
void
CDiagKernel::init()
52
{
53
diag
=1.0;
54
SG_ADD
(&
diag
,
"diag"
,
"Value on kernel diagonal."
,
MS_AVAILABLE
);
55
}
shogun::CDiagKernel::init
virtual bool init(CFeatures *l, CFeatures *r)
Definition:
DiagKernel.cpp:45
shogun::CDiagKernel::diag
float64_t diag
Definition:
DiagKernel.h:110
Parameter.h
SGIO.h
config.h
float64_t
double float64_t
Definition:
common.h:50
shogun::CKernel::init_normalizer
virtual bool init_normalizer()
Definition:
Kernel.cpp:168
shogun::MS_AVAILABLE
Definition:
SGObject.h:90
DiagKernel.h
shogun::CDiagKernel::~CDiagKernel
virtual ~CDiagKernel()
Definition:
DiagKernel.cpp:41
shogun
all of classes and functions are contained in the shogun namespace
Definition:
class_list.h:18
shogun::CFeatures
The class Features is the base class of all feature objects.
Definition:
Features.h:68
common.h
shogun::CKernel
The Kernel base class.
Definition:
Kernel.h:158
SG_ADD
#define SG_ADD(...)
Definition:
SGObject.h:81
shogun::CDiagKernel::CDiagKernel
CDiagKernel()
Definition:
DiagKernel.cpp:20
SHOGUN
机器学习工具包 - 项目文档