yat  0.21pre
Naive.h
1 #ifndef _theplu_yat_regression_naive_
2 #define _theplu_yat_regression_naive_
3 
4 // $Id: Naive.h 4207 2022-08-26 04:36:28Z peter $
5 
6 /*
7  Copyright (C) 2004 Peter Johansson
8  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2022 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 "OneDimensional.h"
28 
29 #include <utility>
30 
31 namespace theplu {
32 namespace yat {
33  namespace utility {
34  class VectorBase;
35  }
36 namespace regression {
37 
44  class Naive : public OneDimensional
45  {
46 
47  public:
51  Naive(void);
52 
56  virtual ~Naive(void);
57 
63  void fit(const utility::VectorBase& x, const utility::VectorBase& y);
64 
68  double predict(const double x) const;
69 
75  double s2(void) const;
76 
84  double standard_error2(const double x) const;
85 
86  private:
90  Naive(const Naive&);
91 
92  double mse_;
93  };
94 
95 }}} // of namespaces regression, yat, and theplu
96 
97 #endif
The Department of Theoretical Physics namespace as we define it.
void fit(const utility::VectorBase &x, const utility::VectorBase &y)
double predict(const double x) const
double standard_error2(const double x) const
virtual ~Naive(void)
The destructor.
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
Interface Class for One Dimensional fitting.
Definition: OneDimensional.h:43
Naive(void)
The default constructor.
Naive Regression.
Definition: Naive.h:44

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