SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
machine
gp
GaussianLikelihood.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
* Copyright (C) 2012 Jacob Walker
9
* Copyright (C) 2013 Roman Votyakov
10
*/
11
12
#ifndef CGAUSSIANLIKELIHOOD_H_
13
#define CGAUSSIANLIKELIHOOD_H_
14
15
#include <
shogun/lib/config.h
>
16
17
#ifdef HAVE_EIGEN3
18
19
#include <
shogun/machine/gp/LikelihoodModel.h
>
20
21
namespace
shogun
22
{
23
34
class
CGaussianLikelihood
:
public
CLikelihoodModel
35
{
36
public
:
38
CGaussianLikelihood
();
39
44
CGaussianLikelihood
(
float64_t
sigma);
45
46
virtual
~CGaussianLikelihood
();
47
52
virtual
const
char
*
get_name
()
const
{
return
"GaussianLikelihood"
; }
53
58
float64_t
get_sigma
() {
return
m_sigma; }
59
64
void
set_sigma
(
float64_t
sigma)
65
{
66
REQUIRE
(sigma>0.0,
"Standard deviation must be greater than zero\n"
)
67
m_sigma=sigma;
68
}
69
75
static
CGaussianLikelihood
*
obtain_from_generic
(
CLikelihoodModel
* lik);
76
92
virtual
SGVector<float64_t>
get_predictive_means
(
SGVector<float64_t>
mu,
93
SGVector<float64_t>
s2,
const
CLabels
* lab=NULL)
const
;
94
109
virtual
SGVector<float64_t>
get_predictive_variances
(
SGVector<float64_t>
mu,
110
SGVector<float64_t>
s2,
const
CLabels
* lab=NULL)
const
;
111
116
virtual
ELikelihoodModelType
get_model_type
()
const
{
return
LT_GAUSSIAN
; }
117
129
virtual
SGVector<float64_t>
get_log_probability_f
(
const
CLabels
* lab,
130
SGVector<float64_t>
func)
const
;
131
142
virtual
SGVector<float64_t>
get_log_probability_derivative_f
(
143
const
CLabels
* lab,
SGVector<float64_t>
func,
index_t
i)
const
;
144
154
virtual
SGVector<float64_t>
get_first_derivative
(
const
CLabels
* lab,
155
SGVector<float64_t>
func,
const
TParameter
* param)
const
;
156
167
virtual
SGVector<float64_t>
get_second_derivative
(
const
CLabels
* lab,
168
SGVector<float64_t>
func,
const
TParameter
* param)
const
;
169
180
virtual
SGVector<float64_t>
get_third_derivative
(
const
CLabels
* lab,
181
SGVector<float64_t>
func,
const
TParameter
* param)
const
;
182
199
virtual
SGVector<float64_t>
get_log_zeroth_moments
(
SGVector<float64_t>
mu,
200
SGVector<float64_t>
s2,
const
CLabels
* lab)
const
;
201
216
virtual
float64_t
get_first_moment
(
SGVector<float64_t>
mu,
217
SGVector<float64_t>
s2,
const
CLabels
* lab,
index_t
i)
const
;
218
233
virtual
float64_t
get_second_moment
(
SGVector<float64_t>
mu,
234
SGVector<float64_t>
s2,
const
CLabels
* lab,
index_t
i)
const
;
235
240
virtual
bool
supports_regression
()
const
{
return
true
; }
241
242
private
:
244
void
init();
245
247
float64_t
m_sigma;
248
};
249
}
250
#endif
/* HAVE_EIGEN3 */
251
#endif
/* CGAUSSIANLIKELIHOOD_H_ */
SHOGUN
机器学习工具包 - 项目文档