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 #include "OneDimensional.h"
00026
00027 #include <cmath>
00028
00029 namespace theplu {
00030 namespace yat {
00031 namespace utility {
00032 class VectorBase;
00033 }
00034 namespace regression {
00035
00042 class Linear : public OneDimensional
00043 {
00044
00045 public:
00049 Linear(void);
00050
00054 virtual ~Linear(void);
00055
00062 double alpha(void) const;
00063
00070 double alpha_var(void) const;
00071
00078 double beta(void) const;
00079
00086 double beta_var(void) const;
00087
00093 void fit(const utility::VectorBase& x, const utility::VectorBase& y) ;
00094
00098 double predict(const double x) const;
00099
00105 double s2(void) const;
00106
00113 double standard_error2(const double x) const;
00114
00115
00116 private:
00120 Linear(const Linear&);
00121
00122 double alpha_;
00123 double alpha_var_;
00124 double beta_;
00125 double beta_var_;
00126 };
00127
00128 }}}
00129
00130 #endif