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
LikelihoodModel.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 CLIKELIHOODMODEL_H_
11
#define CLIKELIHOODMODEL_H_
12
#include <
shogun/lib/config.h
>
13
#ifdef HAVE_EIGEN3
14
#include <
shogun/base/SGObject.h
>
15
#include <
shogun/labels/RegressionLabels.h
>
16
17
18
namespace
shogun
19
{
20
22
enum
ELikelihoodModelType
23
{
24
LT_NONE
= 0,
25
LT_GAUSSIAN
= 10,
26
LT_STUDENTST
= 20
27
};
28
29
37
class
CLikelihoodModel
:
public
CSGObject
38
{
39
40
public
:
41
42
/*Constructor*/
43
CLikelihoodModel
();
44
45
/*Destructor*/
46
virtual
~CLikelihoodModel
();
47
53
virtual
float64_t
get_parameter_derivative
(
const
char
* param_name);
54
60
virtual
SGVector<float64_t>
evaluate_means
(
SGVector<float64_t>
& means) = 0;
61
67
virtual
SGVector<float64_t>
evaluate_variances
(
SGVector<float64_t>
& vars) = 0;
68
73
virtual
ELikelihoodModelType
get_model_type
() {
return
LT_NONE
;}
74
81
inline
virtual
float64_t
get_degrees_freedom
() {
return
m_df
;}
82
91
virtual
float64_t
get_log_probability_f
(
CRegressionLabels
* labels,
92
SGVector<float64_t>
f) = 0;
93
94
106
virtual
SGVector<float64_t>
get_log_probability_derivative_f
(
107
CRegressionLabels
* labels,
SGVector<float64_t>
f,
index_t
i) = 0;
108
120
virtual
SGVector<float64_t>
get_first_derivative
(
CRegressionLabels
* labels,
121
TParameter
* param,
CSGObject
* obj,
SGVector<float64_t>
function
) = 0;
122
139
virtual
SGVector<float64_t>
get_second_derivative
(
CRegressionLabels
* labels,
140
TParameter
* param,
CSGObject
* obj,
SGVector<float64_t>
function
) = 0;
141
protected
:
142
144
float64_t
m_df
;
145
146
};
147
148
149
}
150
#endif
/* HAVE_EIGEN3 */
151
#endif
/* CLIKELIHOODMODEL_H_ */
SHOGUN
Machine Learning Toolbox - Documentation