yat
0.11.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
regression
MultiDimensional.h
1
#ifndef _theplu_yat_regression_multidimensional_
2
#define _theplu_yat_regression_multidimensional_
3
4
// $Id: MultiDimensional.h 2126 2009-12-22 20:45:07Z peter $
5
6
/*
7
Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8
Copyright (C) 2009 Peter Johansson
9
10
This file is part of the yat library, http://dev.thep.lu.se/yat
11
12
The yat library is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License as
14
published by the Free Software Foundation; either version 3 of the
15
License, or (at your option) any later version.
16
17
The yat library is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with yat. If not, see <http://www.gnu.org/licenses/>.
24
*/
25
26
#include "yat/utility/Matrix.h"
27
#include "yat/utility/Vector.h"
28
29
#include <gsl/gsl_multifit.h>
30
31
namespace
theplu {
32
namespace
yat {
33
namespace
regression {
34
38
class
MultiDimensional
39
{
40
public
:
41
45
MultiDimensional
(
void
);
46
50
~MultiDimensional
(
void
);
51
55
const
utility::Matrix
&
covariance
(
void
)
const
;
56
67
void
fit
(
const
utility::Matrix
& X,
const
utility::VectorBase
& y);
68
72
const
utility::Vector
&
fit_parameters
(
void
)
const
;
73
77
double
chisq
(
void
)
const
;
78
82
double
predict
(
const
utility::VectorBase
& x)
const
;
83
88
double
prediction_error2
(
const
utility::VectorBase
& x)
const
;
89
93
double
standard_error2
(
const
utility::VectorBase
& x)
const
;
94
95
private
:
96
// no copy allowed
97
MultiDimensional
(
const
MultiDimensional
&);
98
MultiDimensional
& operator=(
const
MultiDimensional
&);
99
100
double
chisquare_;
101
double
s2_;
102
utility::Matrix
covariance_;
103
utility::Vector
fit_parameters_;
104
gsl_multifit_linear_workspace* work_;
105
106
};
107
108
}}}
// of namespaces regression, yat, and theplu
109
110
#endif
Generated on Sat May 24 2014 03:33:05 for yat by
1.8.2