SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
machine
gp
ExactInferenceMethod.h
Go to the documentation of this file.
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 CEXACTINFERENCEMETHOD_H_
13
#define CEXACTINFERENCEMETHOD_H_
14
15
#include <
shogun/lib/config.h
>
16
17
#ifdef HAVE_EIGEN3
18
19
#include <
shogun/machine/gp/InferenceMethod.h
>
20
21
namespace
shogun
22
{
23
47
class
CExactInferenceMethod
:
public
CInferenceMethod
48
{
49
public
:
51
CExactInferenceMethod
();
52
61
CExactInferenceMethod
(
CKernel
* kernel,
CFeatures
* features,
62
CMeanFunction
* mean,
CLabels
* labels,
CLikelihoodModel
* model);
63
64
virtual
~CExactInferenceMethod
();
65
70
virtual
EInferenceType
get_inference_type
()
const
{
return
INF_EXACT
; }
71
76
virtual
const
char
*
get_name
()
const
{
return
"ExactInferenceMethod"
; }
77
89
virtual
float64_t
get_negative_log_marginal_likelihood
();
90
101
virtual
SGVector<float64_t>
get_alpha
();
102
114
virtual
SGMatrix<float64_t>
get_cholesky
();
115
127
virtual
SGVector<float64_t>
get_diagonal_vector
();
128
138
virtual
SGVector<float64_t>
get_posterior_mean
();
139
149
virtual
SGMatrix<float64_t>
get_posterior_covariance
();
150
155
virtual
bool
supports_regression
()
const
156
{
157
check_members
();
158
return
m_model
->
supports_regression
();
159
}
160
162
virtual
void
update
();
163
164
protected
:
166
virtual
void
check_members
()
const
;
167
169
virtual
void
update_alpha
();
170
172
virtual
void
update_chol
();
173
175
virtual
void
update_mean
();
176
178
virtual
void
update_cov
();
179
183
virtual
void
update_deriv
();
184
192
virtual
SGVector<float64_t>
get_derivative_wrt_inference_method
(
193
const
TParameter
* param);
194
202
virtual
SGVector<float64_t>
get_derivative_wrt_likelihood_model
(
203
const
TParameter
* param);
204
212
virtual
SGVector<float64_t>
get_derivative_wrt_kernel
(
213
const
TParameter
* param);
214
222
virtual
SGVector<float64_t>
get_derivative_wrt_mean
(
223
const
TParameter
* param);
224
225
private
:
227
SGMatrix<float64_t>
m_Sigma;
228
230
SGVector<float64_t>
m_mu;
231
232
SGMatrix<float64_t>
m_Q;
233
};
234
}
235
#endif
/* HAVE_EIGEN3 */
236
#endif
/* CEXACTINFERENCEMETHOD_H_ */
SHOGUN
Machine Learning Toolbox - Documentation