yat  0.12.3pre
OneDimensionalWeighted.h
1 #ifndef _theplu_yat_regression_onedimensioanlweighted_
2 #define _theplu_yat_regression_onedimensioanlweighted_
3 
4 // $Id: OneDimensionalWeighted.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 "yat/statistics/AveragerPairWeighted.h"
27 
28 #include <ostream>
29 
30 namespace theplu {
31 namespace yat {
32 namespace utility {
33  class VectorBase;
34 }
35 namespace regression {
36 
42  {
43 
44  public:
49 
53  virtual ~OneDimensionalWeighted(void);
54 
62  virtual void fit(const utility::VectorBase& x, const utility::VectorBase& y,
63  const utility::VectorBase& w)=0;
64 
68  virtual double predict(const double x) const=0;
69 
83  double prediction_error2(const double x, const double w=1.0) const;
84 
90  double r2(void) const;
91 
98  virtual double s2(double w=1) const=0;
99 
106  virtual double standard_error2(const double x) const=0;
107 
108  protected:
113 
120  double chisq_;
121 
122  private:
123  };
124 
125 }}} // of namespaces regression, yat, and theplu
126 
127 #endif
double chisq_
Chi-squared.
Definition: OneDimensionalWeighted.h:120
virtual double s2(double w=1) const =0
virtual void fit(const utility::VectorBase &x, const utility::VectorBase &y, const utility::VectorBase &w)=0
Class for taking care of mean and covariance of two variables in a weighted manner.
Definition: AveragerPairWeighted.h:56
double prediction_error2(const double x, const double w=1.0) const
virtual double standard_error2(const double x) const =0
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
virtual double predict(const double x) const =0
statistics::AveragerPairWeighted ap_
Definition: OneDimensionalWeighted.h:112

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