00001 #ifndef _theplu_yat_regression_naiveweighted_
00002 #define _theplu_yat_regression_naiveweighted_
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 "OneDimensionalWeighted.h"
00027
00028 #include <cmath>
00029 #include <iostream>
00030 #include <utility>
00031
00032 namespace theplu {
00033 namespace yat {
00034 namespace utility {
00035 class VectorBase;
00036 }
00037 namespace regression {
00038
00044 class NaiveWeighted : public OneDimensionalWeighted
00045 {
00046
00047 public:
00051 NaiveWeighted(void);
00052
00056 virtual ~NaiveWeighted(void);
00057
00064 void fit(const utility::VectorBase& x,
00065 const utility::VectorBase& y,
00066 const utility::VectorBase& w);
00067
00072 double predict(const double x) const;
00073
00083 double s2(const double w=1) const;
00084
00091 double standard_error2(const double x) const;
00092
00093 private:
00097 NaiveWeighted(const NaiveWeighted&);
00098
00099 };
00100
00101 }}}
00102
00103 #endif