Changeset 400
 Timestamp:
 Oct 18, 2005, 5:37:09 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/statistics/AveragerWeighted.h
r398 r400 67 67 68 68 /// 69 /// Calculating the squared error according to: \f$ \frac{\sum70 /// w_i^2(x_im)^2}{(\sum w_i)^2} \f$71 ///72 /// @return squared error73 ///74 inline double squared_error(void) const75 { return (squared_sum()) / (sum_w()*sum_w()); }76 77 ///78 69 /// The standard error is calculated as \f$ \sqrt{\frac{\sum 79 70 /// w_i^2}{(\sum w_i)^2\sum w_i^2}\frac{\sum w_i(x_im)^2}{\sum … … 95 86 96 87 /// 97 /// Calculating the squared sum98 ///99 /// @return \f$ \sum w_i^2(x_im)^2 \f$100 ///101 inline double squared_sum(void) const102 { return (sum_wwxx()2*mean()*wwx_+ mean()*mean()*sum_ww()) ; }103 104 ///105 88 /// Calculating the sum of weights: \f$ \sum 106 89 /// w_i \f$ @return sum of weights … … 108 91 inline double sum_w(void) const 109 92 { return w_.sum_x(); } 110 111 ///112 /// \f$ \sum w_ix_i \f$ @return weighted sum of x113 ///114 inline double sum_wx(void) const115 { return wx_.sum_x(); }116 93 117 94 /// … … 125 102 { return sum_ww() / (sum_w()*sum_w()sum_ww()) * sum_xx_centered(); } 126 103 127 ///128 /// @return \f$ \sum_i w_i (x_im)^2\f$129 ///130 inline double sum_xx_centered(void) const131 { return sum_wxx()  mean()*mean()*sum_w(); }132 104 133 105 private: 106 /// 107 /// \f$ \sum w_ix_i \f$ @return weighted sum of x 108 /// 109 inline double sum_wx(void) const 110 { return wx_.sum_x(); } 111 134 112 inline double sum_ww(void) const 135 113 { return w_.sum_xsqr(); } 114 136 115 /// 137 116 /// @return \f$ \sum w_i^2x_i^2 \f$ … … 150 129 /// 151 130 inline double sum_wxx(void) const { return wxx_; } 131 132 /// 133 /// @return \f$ \sum_i w_i (x_im)^2\f$ 134 /// 135 inline double sum_xx_centered(void) const 136 { return sum_wxx()  mean()*mean()*sum_w(); } 152 137 153 138 ///
Note: See TracChangeset
for help on using the changeset viewer.