SHOGUN
v2.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
regression
gp
GaussianLikelihood.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
* Copyright (C) 2012 Jacob Walker
8
*/
9
10
#ifndef CGAUSSIANLIKELIHOOD_H_
11
#define CGAUSSIANLIKELIHOOD_H_
12
#include <
shogun/lib/config.h
>
13
#ifdef HAVE_EIGEN3
14
15
#include <
shogun/regression/gp/LikelihoodModel.h
>
16
17
namespace
shogun
18
{
19
26
class
CGaussianLikelihood
:
public
CLikelihoodModel
27
{
28
29
public
:
30
31
/*Constructor*/
32
CGaussianLikelihood
();
33
34
/*Destructor*/
35
virtual
~CGaussianLikelihood
();
36
42
inline
virtual
const
char
*
get_name
()
const
{
return
"GaussianLikelihood"
; }
43
48
float64_t
get_sigma
() {
return
m_sigma;}
49
54
void
set_sigma
(
float64_t
s) {m_sigma = s;}
55
61
virtual
SGVector<float64_t>
evaluate_means
(
SGVector<float64_t>
& means);
62
68
virtual
SGVector<float64_t>
evaluate_variances
(
SGVector<float64_t>
& vars);
69
74
virtual
ELikelihoodModelType
get_model_type
() {
return
LT_GAUSSIAN
;}
75
84
virtual
float64_t
get_log_probability_f
(
CRegressionLabels
* labels,
85
SGVector<float64_t>
f);
86
87
99
virtual
SGVector<float64_t>
get_log_probability_derivative_f
(
100
CRegressionLabels
* labels,
SGVector<float64_t>
f,
index_t
i);
101
113
virtual
SGVector<float64_t>
get_first_derivative
(
CRegressionLabels
* labels,
114
TParameter
* param,
CSGObject
* obj,
SGVector<float64_t>
function
);
115
132
virtual
SGVector<float64_t>
get_second_derivative
(
CRegressionLabels
* labels,
133
TParameter
* param,
CSGObject
* obj,
SGVector<float64_t>
function
);
134
135
private
:
137
float64_t
m_sigma;
138
139
/*Initialize function*/
140
void
init();
141
};
142
143
}
144
#endif
/* HAVE_EIGEN3 */
145
#endif
/* CGAUSSIANLIKELIHOOD_H_ */
SHOGUN
Machine Learning Toolbox - Documentation