yat  0.14.5pre
NaiveWeighted.h
1 #ifndef _theplu_yat_regression_naiveweighted_
2 #define _theplu_yat_regression_naiveweighted_
3 
4 // $Id: NaiveWeighted.h 2919 2012-12-19 06:54:23Z peter $
5 
6 /*
7  Copyright (C) 2005 Peter Johansson
8  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2012 Peter Johansson
10 
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12 
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17 
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #include "OneDimensionalWeighted.h"
28 
29 #include <cmath>
30 #include <utility>
31 
32 namespace theplu {
33 namespace yat {
34  namespace utility {
35  class VectorBase;
36  }
37 namespace regression {
38 
43  {
44 
45  public:
49  NaiveWeighted(void);
50 
54  virtual ~NaiveWeighted(void);
55 
62  void fit(const utility::VectorBase& x,
63  const utility::VectorBase& y,
64  const utility::VectorBase& w);
65 
70  double predict(const double x) const;
71 
81  double s2(const double w=1) const;
82 
89  double standard_error2(const double x) const;
90 
91  private:
96 
97  };
98 
99 }}} // of namespaces regression, yat, and theplu
100 
101 #endif
naive fitting.
Definition: NaiveWeighted.h:42
void fit(const utility::VectorBase &x, const utility::VectorBase &y, const utility::VectorBase &w)
double s2(const double w=1) const
NaiveWeighted(void)
The default constructor.
This is the yat interface to GSL vector.
Definition: VectorBase.h:52
Interface Class for One Dimensional fitting in a weighted fashion.
Definition: OneDimensionalWeighted.h:41
double predict(const double x) const
double standard_error2(const double x) const
virtual ~NaiveWeighted(void)
The destructor.

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5