yat  0.12.3pre
PolynomialWeighted.h
1 #ifndef _theplu_yat_regression_polynomialweighted_
2 #define _theplu_yat_regression_polynomialweighted_
3 
4 // $Id: PolynomialWeighted.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 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 "OneDimensionalWeighted.h"
26 #include "MultiDimensionalWeighted.h"
27 #include "yat/utility/Vector.h"
28 
29 namespace theplu {
30 namespace yat {
31 namespace regression {
32 
37  {
38  public:
39 
43  PolynomialWeighted(size_t power);
44 
48  ~PolynomialWeighted(void);
49 
57  void fit(const utility::VectorBase& x, const utility::VectorBase& y,
58  const utility::VectorBase& w);
59 
65  const utility::Vector& fit_parameters(void) const;
66 
70  double s2(const double w=1) const;
71 
75  double predict(const double x) const;
76 
80  double standard_error2(const double x) const;
81 
82  private:
84  size_t power_;
85 
86  };
87 
88 }}} // of namespaces regression, yat, and theplu
89 
90 #endif
void fit(const utility::VectorBase &x, const utility::VectorBase &y, const utility::VectorBase &w)
double standard_error2(const double x) const
double predict(const double x) const
This is the yat interface to GSL vector.
Definition: Vector.h:57
This is the yat interface to GSL vector.
Definition: VectorBase.h:52
const utility::Vector & fit_parameters(void) const
Polynomial Regression in weighted fashion.
Definition: PolynomialWeighted.h:36
Interface Class for One Dimensional fitting in a weighted fashion.
Definition: OneDimensionalWeighted.h:41
double s2(const double w=1) const
Mean Squared Error.
MultiDimesional fitting.
Definition: MultiDimensionalWeighted.h:38

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