Changeset 669
 Timestamp:
 Oct 7, 2006, 6:42:44 AM (15 years ago)
 Location:
 trunk
 Files:

 2 added
 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/c++_tools/statistics/Makefile.am
r586 r669 38 38 Polynomial.cc \ 39 39 PolynomialWeighted.cc \ 40 ROC.cc S core.cc tScore.cc SNR.cc utility.cc \40 ROC.cc SAM.cc Score.cc SNR.cc tScore.cc utility.cc \ 41 41 WilcoxonFoldChange.cc 42 42 … … 55 55 Polynomial.h \ 56 56 PolynomialWeighted.h \ 57 ROC.h S core.h SNR.h tScore.h \57 ROC.h SAM.h Score.h SNR.h tScore.h \ 58 58 utility.h WilcoxonFoldChange.h 
trunk/c++_tools/statistics/tScore.h
r623 r669 33 33 tScore(bool absolute=true); 34 34 35 /// 36 /// Calculates the value of tscore, i.e. the ratio between 37 /// difference in mean and standard deviation of this 38 /// difference. \f$ t = \frac{ m_x  m_y } 39 /// {\frac{s^2}{n_x}+\frac{s^2}{n_y}} \f$ where \f$ m \f$ is the 40 /// mean, \f$ n \f$ is the number of data points and \f$ s^2 = 41 /// \frac{ \sum_i (x_im_x)^2 + \sum_i (y_im_y)^2 }{ n_x + n_y  42 /// 2 } \f$ 43 /// 44 /// @return tscore if absolute=true absolute value of tscore 45 /// is returned 46 /// 35 36 /** 37 Calculates the value of tscore, i.e. the ratio between 38 difference in mean and standard deviation of this 39 difference. \f$ t = \frac{ m_x  m_y } 40 {s\sqrt{\frac{1}{n_x}+\frac{1}{n_y}}} \f$ where \f$ m \f$ is the 41 mean, \f$ n \f$ is the number of data points and \f$ s^2 = 42 \frac{ \sum_i (x_im_x)^2 + \sum_i (y_im_y)^2 }{ n_x + n_y  43 2 } \f$ 44 45 @return tscore. If absolute=true absolute value of tscore 46 is returned 47 */ 47 48 double score(const classifier::Target& target, 48 49 const utility::vector& value); 49 50 50 /// 51 /// Calculates the weighted tscore, i.e. the ratio between 52 /// difference in mean and standard deviation of this 53 /// difference. \f$ t = \frac{ m_x  m_y }{ 54 /// \frac{s2}{n_x}+\frac{s2}{n_y}} \f$ where \f$ m \f$ is the 55 /// weighted mean, n is the weighted version of number of data 56 /// points and \f$ s2 \f$ is an estimation of the variance \f$ s^2 57 /// = \frac{ \sum_i w_i(x_im_x)^2 + \sum_i w_i(y_im_y)^2 }{ n_x 58 /// + n_y  2 } \f$. See AveragerWeighted for details. 59 /// 60 /// @return tscore if absolute=true absolute value of tscore 61 /// is returned 62 /// 51 /** 52 Calculates the weighted tscore, i.e. the ratio between 53 difference in mean and standard deviation of this 54 difference. \f$ t = \frac{ m_x  m_y }{ 55 s\sqrt{\frac{1}{n_x}+\frac{1}{n_y}}} \f$ where \f$ m \f$ is the 56 weighted mean, n is the weighted version of number of data 57 points \f$ \frac{\left(\sum w_i\right)^2}{\sum w_i^2} \f$, and 58 \f$ s^2 \f$ is an estimation of the variance \f$ s^2 = \frac{ 59 \sum_i w_i(x_im_x)^2 + \sum_i w_i(y_im_y)^2 }{ n_x + n_y  2 60 } \f$. See AveragerWeighted for details. 61 62 @return tscore. If absolute=true absolute value of tscore 63 is returned 64 */ 63 65 double score(const classifier::Target& target, 64 66 const classifier::DataLookupWeighted1D& value); 
trunk/test/score_test.cc
r616 r669 1 1 // $Id$ 2 2 3 #include <c++_tools/statistics/FoldChange.h> 4 #include <c++_tools/statistics/Pearson.h> 3 5 #include <c++_tools/statistics/ROC.h> 6 #include <c++_tools/statistics/SAM.h> 4 7 #include <c++_tools/statistics/tScore.h> 5 #include <c++_tools/statistics/Pearson.h>6 #include <c++_tools/statistics/FoldChange.h>7 8 #include <c++_tools/statistics/WilcoxonFoldChange.h> 8 9 #include <c++_tools/utility/matrix.h> … … 119 120 statistics::WilcoxonFoldChange wfc(true); 120 121 122 *error << "testing SAM" << std::endl; 123 statistics::SAM sam(1.0,true); 124 121 125 122 126 if (ok)
Note: See TracChangeset
for help on using the changeset viewer.