yat  0.21pre
PolynomialWeighted.h
1 #ifndef _theplu_yat_regression_polynomialweighted_
2 #define _theplu_yat_regression_polynomialweighted_
3 
4 // $Id: PolynomialWeighted.h 4207 2022-08-26 04:36:28Z peter $
5 
6 /*
7  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2022 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 "OneDimensionalWeighted.h"
27 #include "MultiDimensionalWeighted.h"
28 #include "yat/utility/Vector.h"
29 
30 namespace theplu {
31 namespace yat {
32 namespace regression {
33 
38  {
39  public:
40 
44  PolynomialWeighted(size_t power);
45 
49  ~PolynomialWeighted(void);
50 
58  void fit(const utility::VectorBase& x, const utility::VectorBase& y,
59  const utility::VectorBase& w);
60 
66  const utility::Vector& fit_parameters(void) const;
67 
71  double s2(const double w=1) const;
72 
76  double predict(const double x) const;
77 
81  double standard_error2(const double x) const;
82 
83  private:
85  size_t power_;
86 
87  };
88 
89 }}} // of namespaces regression, yat, and theplu
90 
91 #endif
void fit(const utility::VectorBase &x, const utility::VectorBase &y, const utility::VectorBase &w)
The Department of Theoretical Physics namespace as we define it.
double standard_error2(const double x) const
double predict(const double x) const
const utility::Vector & fit_parameters(void) const
This is the yat interface to GSL vector.
Definition: Vector.h:59
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
Polynomial Regression in weighted fashion.
Definition: PolynomialWeighted.h:37
Interface Class for One Dimensional fitting in a weighted fashion.
Definition: OneDimensionalWeighted.h:42
double s2(const double w=1) const
Mean Squared Error.
MultiDimesional fitting.
Definition: MultiDimensionalWeighted.h:38

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14