yat  0.12.3pre
Polynomial.h
1 #ifndef _theplu_yat_regression_polynomial_
2 #define _theplu_yat_regression_polynomial_
3 
4 // $Id: Polynomial.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #include "OneDimensional.h"
26 #include "MultiDimensional.h"
27 
28 namespace theplu {
29 namespace yat {
30 namespace utility {
31  class VectorBase;
32 }
33 namespace regression {
34 
41  class Polynomial : public OneDimensional
42  {
43  public:
44 
48  explicit Polynomial(size_t power);
49 
53  ~Polynomial(void);
54 
58  const utility::Matrix& covariance(void) const;
59 
64  void fit(const utility::VectorBase& x, const utility::VectorBase& y);
65 
71  const utility::Vector& fit_parameters(void) const;
72 
76  double predict(const double x) const;
77 
84  double s2(void) const;
85 
89  double standard_error2(const double x) const;
90 
91  private:
92  MultiDimensional md_;
93  size_t power_;
94 
95  };
96 
97 }}} // of namespaces regression, yat, and theplu
98 
99 #endif
const utility::Vector & fit_parameters(void) const
double predict(const double x) const
void fit(const utility::VectorBase &x, const utility::VectorBase &y)
const utility::Matrix & covariance(void) const
covariance of parameters
MultiDimesional fitting.
Definition: MultiDimensional.h:38
This is the yat interface to GSL vector.
Definition: Vector.h:57
This is the yat interface to GSL vector.
Definition: VectorBase.h:52
Interface Class for One Dimensional fitting.
Definition: OneDimensional.h:43
Interface to GSL matrix.
Definition: Matrix.h:63
Polynomial regression.
Definition: Polynomial.h:41
double standard_error2(const double x) const

Generated on Mon Jun 1 2015 12:29:51 for yat by  doxygen 1.8.5