SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
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>
17 
18 using namespace shogun;
19 
21 : CKernel()
22 {
23  init();
24 }
25 
27 : CKernel(size)
28 {
29  init();
30  diag=d;
31 }
32 
34 : CKernel()
35 {
36  init();
37  diag=d;
38  init(l, r);
39 }
40 
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 }
virtual bool init(CFeatures *l, CFeatures *r)
Definition: DiagKernel.cpp:45
double float64_t
Definition: common.h:50
virtual bool init_normalizer()
Definition: Kernel.cpp:168
virtual ~CDiagKernel()
Definition: DiagKernel.cpp:41
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
The Kernel base class.
Definition: Kernel.h:158
#define SG_ADD(...)
Definition: SGObject.h:81

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