00001 #ifndef _theplu_yat_regression_polynomial_
00002 #define _theplu_yat_regression_polynomial_
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 #include "MultiDimensional.h"
00027
00028 namespace theplu {
00029 namespace yat {
00030 namespace utility {
00031 class VectorBase;
00032 }
00033 namespace regression {
00034
00041 class Polynomial : public OneDimensional
00042 {
00043 public:
00044
00048 explicit Polynomial(size_t power);
00049
00053 ~Polynomial(void);
00054
00058 const utility::Matrix& covariance(void) const;
00059
00064 void fit(const utility::VectorBase& x, const utility::VectorBase& y);
00065
00071 const utility::Vector& fit_parameters(void) const;
00072
00076 double predict(const double x) const;
00077
00084 double s2(void) const;
00085
00089 double standard_error2(const double x) const;
00090
00091 private:
00092 MultiDimensional md_;
00093 size_t power_;
00094
00095 };
00096
00097 }}}
00098
00099 #endif