00001 #ifndef _theplu_yat_regression_onedimensioanlweighted_
00002 #define _theplu_yat_regression_onedimensioanlweighted_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "yat/statistics/AveragerPairWeighted.h"
00027
00028 #include <ostream>
00029
00030 namespace theplu {
00031 namespace yat {
00032 namespace utility {
00033 class VectorBase;
00034 }
00035 namespace regression {
00036
00041 class OneDimensionalWeighted
00042 {
00043
00044 public:
00048 OneDimensionalWeighted(void);
00049
00053 virtual ~OneDimensionalWeighted(void);
00054
00062 virtual void fit(const utility::VectorBase& x, const utility::VectorBase& y,
00063 const utility::VectorBase& w)=0;
00064
00068 virtual double predict(const double x) const=0;
00069
00083 double prediction_error2(const double x, const double w=1.0) const;
00084
00090 double r2(void) const;
00091
00098 virtual double s2(double w=1) const=0;
00099
00106 virtual double standard_error2(const double x) const=0;
00107
00108 protected:
00112 statistics::AveragerPairWeighted ap_;
00113
00120 double chisq_;
00121
00122 private:
00123 };
00124
00125 }}}
00126
00127 #endif