00001 #ifndef _theplu_yat_regression_linear_
00002 #define _theplu_yat_regression_linear_
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 "OneDimensional.h"
00027
00028 #include <cmath>
00029
00030 namespace theplu {
00031 namespace yat {
00032 namespace utility {
00033 class VectorBase;
00034 }
00035 namespace regression {
00036
00043 class Linear : public OneDimensional
00044 {
00045
00046 public:
00050 Linear(void);
00051
00055 virtual ~Linear(void);
00056
00063 double alpha(void) const;
00064
00071 double alpha_var(void) const;
00072
00079 double beta(void) const;
00080
00087 double beta_var(void) const;
00088
00094 void fit(const utility::VectorBase& x, const utility::VectorBase& y) ;
00095
00099 double predict(const double x) const;
00100
00106 double s2(void) const;
00107
00114 double standard_error2(const double x) const;
00115
00116
00117 private:
00121 Linear(const Linear&);
00122
00123 double alpha_;
00124 double alpha_var_;
00125 double beta_;
00126 double beta_var_;
00127 };
00128
00129 }}}
00130
00131 #endif