yat  0.9.3pre
NaiveWeighted.h
1 #ifndef _theplu_yat_regression_naiveweighted_
2 #define _theplu_yat_regression_naiveweighted_
3 
4 // $Id: NaiveWeighted.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 2005 Peter Johansson
8  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, 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 
28 #include <cmath>
29 #include <utility>
30 
31 namespace theplu {
32 namespace yat {
33  namespace utility {
34  class VectorBase;
35  }
36 namespace regression {
37 
44  {
45 
46  public:
50  NaiveWeighted(void);
51 
55  virtual ~NaiveWeighted(void);
56 
63  void fit(const utility::VectorBase& x,
64  const utility::VectorBase& y,
65  const utility::VectorBase& w);
66 
71  double predict(const double x) const;
72 
82  double s2(const double w=1) const;
83 
90  double standard_error2(const double x) const;
91 
92  private:
97 
98  };
99 
100 }}} // of namespaces regression, yat, and theplu
101 
102 #endif

Generated on Tue Jan 29 2013 02:33:39 for yat by  doxygen 1.8.1