Changeset 597 for trunk/c++_tools/statistics
- Timestamp:
- Aug 28, 2006, 3:03:54 PM (16 years ago)
- Location:
- trunk/c++_tools/statistics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/c++_tools/statistics/Averager.h
r582 r597 65 65 66 66 /// 67 /// Rescales the object, \f$ \forall x_i \rightarrow a*x_i \f$, \f$68 /// \f orall x_i^2 \rightarrow a^2*x_i^2 \f$67 /// Rescales the object, \f$ \forall x_i \rightarrow a*x_i \f$, 68 /// \f$ \forall x_i^2 \rightarrow a^2*x_i^2 \f$ 69 69 /// 70 70 inline void rescale(double a) { x_*=a; xx_*=a*a; } … … 103 103 104 104 /// 105 /// @return \f$ \sum_i (x_i-m)^2 \f$105 /// @return \f$ \sum_i (x_i-m)^2 \f$ 106 106 /// 107 107 inline double sum_xx_centered(void) const { return xx_-x_*x_/n_; } … … 117 117 /// 118 118 /// The variance is calculated as \f$ \frac{1}{N}\sum_i 119 /// (x_i-m)^2 \f$, where \f$m\f$ is the mean.119 /// (x_i-m)^2 \f$, where \f$ m \f$ is the mean. 120 120 /// 121 121 /// @return estimation of variance … … 127 127 /// The variance is calculated using the \f$ (n-1) \f$ correction, 128 128 /// which means it is the best unbiased estimator of the variance 129 /// \f$ \frac{1}{N-1}\sum_i (x_i-m)^2 \f$, where \f$m\f$ is the129 /// \f$ \frac{1}{N-1}\sum_i (x_i-m)^2 \f$, where \f$ m \f$ is the 130 130 /// mean. 131 131 /// -
trunk/c++_tools/statistics/AveragerPair.h
r593 r597 59 59 60 60 /// 61 /// \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sum_i62 /// (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} \f$61 /// \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sum_i 62 /// (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} \f$ 63 63 /// 64 64 /// In case of a zero denominator - zero is returned. … … 73 73 74 74 /// 75 /// \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sqrt{\sum_i76 /// (x_i-m_x)^2\sum_i (y_i-m_y)^2}} \f$75 /// \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sqrt{\sum_i 76 /// (x_i-m_x)^2\sum_i (y_i-m_y)^2}} \f$ 77 77 /// 78 78 /// @return Pearson correlation coefficient. … … 84 84 /// 85 85 /// Calculating covariance using 86 /// \f$ \frac{1}{N}\sum_i (x_i-m_x)(y_i-m_y) \f$,87 /// where \f$ m\f$ is the mean.86 /// \f$ \frac{1}{N}\sum_i (x_i-m_x)(y_i-m_y) \f$, 87 /// where \f$ m \f$ is the mean. 88 88 /// 89 89 /// @return The covariance. … … 120 120 121 121 /// 122 /// @return \f$ \sum_i (x_i-m_x)(y_i-m_y) \f$122 /// @return \f$ \sum_i (x_i-m_x)(y_i-m_y) \f$ 123 123 /// 124 124 inline double sum_xy_centered(void) const {return xy_-x_.sum_x()*y_.mean();} -
trunk/c++_tools/statistics/Pearson.h
r475 r597 34 34 /// 35 35 /// \f$ \frac{\vert \sum_i(x_i-\bar{x})(y_i-\bar{y})\vert 36 /// }{\sqrt{\sum_i (x_i-\bar{x})^2\sum_i (x_i-\bar{x})^2}} \f$.36 /// }{\sqrt{\sum_i (x_i-\bar{x})^2\sum_i (x_i-\bar{x})^2}} \f$. 37 37 /// @return Pearson correlation, if absolute=true absolute value 38 38 /// of Pearson is used. … … 43 43 /// 44 44 /// \f$ \frac{\vert \sum_iw^2_i(x_i-\bar{x})(y_i-\bar{y})\vert } 45 /// {\sqrt{\sum_iw^2_i(x_i-\bar{x})^2\sum_iw^2_i(y_i-\bar{y})^2}} \f$,46 /// where \f$m_x = \frac{\sum w_ix_i}{\sum w_i}\f$ and \f$m_x =47 /// \frac{\sum w_ix_i}{\sum w_i}\f$. This expression is chosen to48 /// get a correlation equal to unity when \a x and \a y are49 /// equal. @return absolute value of weighted version of Pearson50 /// correlation.45 /// {\sqrt{\sum_iw^2_i(x_i-\bar{x})^2\sum_iw^2_i(y_i-\bar{y})^2}} 46 /// \f$, where \f$ m_x = \frac{\sum w_ix_i}{\sum w_i} \f$ and \f$ 47 /// m_x = \frac{\sum w_ix_i}{\sum w_i} \f$. This expression is 48 /// chosen to get a correlation equal to unity when \a x and \a y 49 /// are equal. @return absolute value of weighted version of 50 /// Pearson correlation. 51 51 /// 52 52 double score(const classifier::Target& target, -
trunk/c++_tools/statistics/tScore.h
r589 r597 38 38 /// mean, \f$ n \f$ is the number of data points and \f$ s^2 = 39 39 /// \frac{ \sum_i (x_i-m_x)^2 + \sum_i (y_i-m_y)^2 }{ n_x + n_y - 40 /// 2 } 40 /// 2 } \f$ 41 41 /// 42 42 /// @return t-score if absolute=true absolute value of t-score … … 49 49 /// Calculates the weighted t-score, i.e. the ratio between 50 50 /// difference in mean and standard deviation of this 51 /// difference. \f$ t = \frac{ m_x - m_y } 52 /// \frac{s2}{n_x}+\frac{s2}{n_y} \f$ where \f$ m \f$ is the51 /// difference. \f$ t = \frac{ m_x - m_y }{ 52 /// \frac{s2}{n_x}+\frac{s2}{n_y}} \f$ where \f$ m \f$ is the 53 53 /// weighted mean, n is the weighted version of number of data 54 54 /// points and \f$ s2 \f$ is an estimation of the variance \f$ s^2
Note: See TracChangeset
for help on using the changeset viewer.