# Changeset 728

Ignore:
Timestamp:
Jan 4, 2007, 5:07:16 PM (16 years ago)
Message:

added virtual function s2 in OneDimensional?.

Location:
trunk/yat/regression
Files:
6 edited

Unmodified
Removed
• ## trunk/yat/regression/Linear.h

 r727 /** \f$\frac{\sum \epsilon_i^2}{N-2} \f$ @return variance of residuals */ double s2(void) const; /** The error of the model is estimated as \f$\textrm{alpha\_err}^2+\textrm{beta\_err}^2*(x-m_x)*(x-m_x)\f$ Linear(const Linear&); double s2(void) const; double alpha_; double alpha_var_;
• ## trunk/yat/regression/Naive.cc

 r727 double Naive::s2(void) const { return chisq()/(ap_.n()-1); } double Naive::standard_error2(const double x) const { return chisq()/ap_.n()/(ap_.n()-1); return s2()/ap_.n(); }
• ## trunk/yat/regression/Naive.h

 r727 double predict(const double x) const; /** \f$\frac{\sum \epsilon_i^2}{N-1} \f$ @return variance of residuals */ double s2(void) const; /// /// @return standard error
• ## trunk/yat/regression/OneDimensional.h

 r727 /** @return variance of residuals */ virtual double s2(void) const=0; /** The standard error is defined as \f$E(Y|x - \hat{y}(x))^2 \f$
• ## trunk/yat/regression/Polynomial.cc

 r727 double Polynomial::s2(void) const { return chisq()/(ap_.n()-power_-1); } double Polynomial::standard_error2(const double x) const {
• ## trunk/yat/regression/Polynomial.h

 r727 double predict(const double x) const; /** \f$\frac{\sum \epsilon_i^2}{N-\textrm{DF}} \f$ where DF is number of parameters in model. @return variance of residuals */ double s2(void) const; /// /// @return squared error of model value in @a x
Note: See TracChangeset for help on using the changeset viewer.