- Timestamp:
- Jan 4, 2007, 5:07:16 PM (16 years ago)
- Location:
- trunk/yat/regression
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/regression/Linear.h
r727 r728 113 113 114 114 /** 115 \f$ \frac{\sum \epsilon_i^2}{N-2} \f$ 116 117 @return variance of residuals 118 */ 119 double s2(void) const; 120 121 /** 115 122 The error of the model is estimated as \f$ 116 123 \textrm{alpha\_err}^2+\textrm{beta\_err}^2*(x-m_x)*(x-m_x)\f$ … … 127 134 Linear(const Linear&); 128 135 129 double s2(void) const;130 131 136 double alpha_; 132 137 double alpha_var_; -
trunk/yat/regression/Naive.cc
r727 r728 66 66 67 67 68 double Naive::s2(void) const 69 { 70 return chisq()/(ap_.n()-1); 71 } 72 73 68 74 double Naive::standard_error2(const double x) const 69 75 { 70 return chisq()/ap_.n()/(ap_.n()-1);76 return s2()/ap_.n(); 71 77 } 72 78 -
trunk/yat/regression/Naive.h
r727 r728 74 74 double predict(const double x) const; 75 75 76 /** 77 \f$ \frac{\sum \epsilon_i^2}{N-1} \f$ 78 79 @return variance of residuals 80 */ 81 double s2(void) const; 82 76 83 /// 77 84 /// @return standard error -
trunk/yat/regression/OneDimensional.h
r727 r728 114 114 115 115 /** 116 @return variance of residuals 117 */ 118 virtual double s2(void) const=0; 119 120 /** 116 121 The standard error is defined as \f$ E(Y|x - \hat{y}(x))^2 \f$ 117 122 -
trunk/yat/regression/Polynomial.cc
r727 r728 78 78 79 79 80 double Polynomial::s2(void) const 81 { 82 return chisq()/(ap_.n()-power_-1); 83 } 84 85 80 86 double Polynomial::standard_error2(const double x) const 81 87 { -
trunk/yat/regression/Polynomial.h
r727 r728 85 85 double predict(const double x) const; 86 86 87 /** 88 \f$ \frac{\sum \epsilon_i^2}{N-\textrm{DF}} \f$ 89 where DF is number of parameters in model. 90 91 @return variance of residuals 92 */ 93 double s2(void) const; 94 87 95 /// 88 96 /// @return squared error of model value in @a x
Note: See TracChangeset
for help on using the changeset viewer.