SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
machine
GaussianProcessMachine.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) 2013 Roman Votyakov
8
*/
9
10
#ifndef _GAUSSIANPROCESSMACHINE_H_
11
#define _GAUSSIANPROCESSMACHINE_H_
12
13
#include <
shogun/lib/config.h
>
14
#include <
shogun/machine/Machine.h
>
15
#include <
shogun/machine/gp/InferenceMethod.h
>
16
17
#ifdef HAVE_EIGEN3
18
19
namespace
shogun
20
{
21
33
class
CGaussianProcessMachine
:
public
CMachine
34
{
35
public
:
37
CGaussianProcessMachine
();
38
43
CGaussianProcessMachine
(
CInferenceMethod
* method);
44
45
virtual
~CGaussianProcessMachine
();
46
51
virtual
const
char
*
get_name
()
const
{
return
"GaussianProcessMachine"
; }
52
61
SGVector<float64_t>
get_posterior_means
(
CFeatures
* data);
62
71
SGVector<float64_t>
get_posterior_variances
(
CFeatures
* data);
72
77
CInferenceMethod
*
get_inference_method
()
const
78
{
79
SG_REF
(
m_method
);
80
return
m_method
;
81
}
82
87
void
set_inference_method
(
CInferenceMethod
* method)
88
{
89
SG_REF
(method);
90
SG_UNREF
(
m_method
);
91
m_method
=method;
92
}
93
98
virtual
void
set_labels
(
CLabels
* lab)
99
{
100
CMachine::set_labels
(lab);
101
m_method
->
set_labels
(lab);
102
}
103
109
virtual
void
store_model_features
() { }
110
111
private
:
112
void
init();
113
114
protected
:
116
CInferenceMethod
*
m_method
;
117
};
118
}
119
#endif
/* HAVE_EIGEN3 */
120
#endif
/* _GAUSSIANPROCESSMACHINE_H_ */
SHOGUN
机器学习工具包 - 项目文档