Changeset 589 for trunk/c++_tools/statistics/tScore.h
 Timestamp:
 Aug 24, 2006, 1:08:40 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/c++_tools/statistics/tScore.h
r532 r589 18 18 /// Class for Fisher's ttest. 19 19 /// 20 /// See <a href="http://en.wikipedia.org/wiki/Student's_ttest"> 21 /// http://en.wikipedia.org/wiki/Student's_ttest</a> for more 22 /// details on the ttest. 23 /// 20 24 class tScore : public Score 21 25 { … … 30 34 /// Calculates the value of tscore, i.e. the ratio between 31 35 /// difference in mean and standard deviation of this 32 /// difference. \f$ \frac{ \vert \frac{1}{n_x}\sum x_i  33 /// \frac{1}{n_y}\sum y_i \vert } {\frac{\sum (x_im_x)^2 + \sum 34 /// (y_im_y)^2}{n_x1+n_y1}} \f$ 36 /// difference. \f$ t = \frac{ m_x  m_y } 37 /// {\frac{s^2}{n_x}+\frac{s^2}{n_y}} \f$ where \f$ m \f$ is the 38 /// mean, \f$ n \f$ is the number of data points and \f$ s^2 = 39 /// \frac{ \sum_i (x_im_x)^2 + \sum_i (y_im_y)^2 }{ n_x + n_y  40 /// 2 } 35 41 /// 36 /// @return tscore if absolute=true 37 /// absolute value of tscoreis returned42 /// @return tscore if absolute=true absolute value of tscore 43 /// is returned 38 44 /// 39 45 double score(const classifier::Target& target, … … 41 47 42 48 /// 43 /// Weighted version of tScore @return tscore if absolute=true 44 /// absolute value of tscore is returned. 49 /// Calculates the weighted tscore, i.e. the ratio between 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 the 53 /// weighted mean, n is the weighted version of number of data 54 /// points and \f$ s2 \f$ is an estimation of the variance \f$ s^2 55 /// = \frac{ \sum_i w_i(x_im_x)^2 + \sum_i w_i(y_im_y)^2 }{ n_x 56 /// + n_y  2 } \f$. See AveragerWeighted for details. 45 57 /// 46 /// @todo document 58 /// @return tscore if absolute=true absolute value of tscore 59 /// is returned 47 60 /// 48 61 double score(const classifier::Target& target, … … 51 64 52 65 /// 53 ///Calculates the pvalue, i.e. the probability of observing a 54 ///tscore equally or larger if the null hypothesis is true. If P 55 ///is near zero, this casts doubt on this hypothesis. The null 56 ///hypothesis is ... @return the onesided pvalue( if 57 ///absolute=true is used the twosided pvalue) 66 /// Calculates the pvalue, i.e. the probability of observing a 67 /// tscore equally or larger if the null hypothesis is true. If P 68 /// is near zero, this casts doubt on this hypothesis. The null 69 /// hypothesis is that the means of the two distributions are 70 /// equal. Assumtions for this test is that the two distributions 71 /// are normal distributions with equal variance. The latter 72 /// assumtion is dropped in Welch's ttest. 73 /// 74 /// @return the onesided pvalue( if absolute=true is used 75 /// the twosided pvalue) 58 76 /// 59 77 double p_value() const;
Note: See TracChangeset
for help on using the changeset viewer.