# Changeset 669

Ignore:
Timestamp:
Oct 7, 2006, 6:42:44 AM (16 years ago)
Message:

#closes #88. SAM score class added

Location:
trunk
Files:
3 edited

### Legend:

Unmodified
 r623 tScore(bool absolute=true); /// /// Calculates the value of t-score, i.e. the ratio between /// difference in mean and standard deviation of this /// difference. \f$t = \frac{ m_x - m_y } /// {\frac{s^2}{n_x}+\frac{s^2}{n_y}} \f$ where \f$m \f$ is the /// mean, \f$n \f$ is the number of data points and \f$s^2 = /// \frac{ \sum_i (x_i-m_x)^2 + \sum_i (y_i-m_y)^2 }{ n_x + n_y - /// 2 } \f$ /// /// @return t-score if absolute=true absolute value of t-score /// is returned /// /** Calculates the value of t-score, i.e. the ratio between difference in mean and standard deviation of this difference. \f$t = \frac{ m_x - m_y } {s\sqrt{\frac{1}{n_x}+\frac{1}{n_y}}} \f$ where \f$m \f$ is the mean, \f$n \f$ is the number of data points and \f$s^2 = \frac{ \sum_i (x_i-m_x)^2 + \sum_i (y_i-m_y)^2 }{ n_x + n_y - 2 } \f$ @return t-score. If absolute=true absolute value of t-score is returned */ double score(const classifier::Target& target, const utility::vector& value); /// /// Calculates the weighted t-score, i.e. the ratio between /// difference in mean and standard deviation of this /// difference. \f$t = \frac{ m_x - m_y }{ /// \frac{s2}{n_x}+\frac{s2}{n_y}} \f$ where \f$m \f$ is the /// weighted mean, n is the weighted version of number of data /// points and \f$s2 \f$ is an estimation of the variance \f$s^2 /// = \frac{ \sum_i w_i(x_i-m_x)^2 + \sum_i w_i(y_i-m_y)^2 }{ n_x /// + n_y - 2 } \f$. See AveragerWeighted for details. /// /// @return t-score if absolute=true absolute value of t-score /// is returned /// /** Calculates the weighted t-score, i.e. the ratio between difference in mean and standard deviation of this difference. \f$t = \frac{ m_x - m_y }{ s\sqrt{\frac{1}{n_x}+\frac{1}{n_y}}} \f$ where \f$m \f$ is the weighted mean, n is the weighted version of number of data points \f$\frac{\left(\sum w_i\right)^2}{\sum w_i^2} \f$, and \f$s^2 \f$ is an estimation of the variance \f$s^2 = \frac{ \sum_i w_i(x_i-m_x)^2 + \sum_i w_i(y_i-m_y)^2 }{ n_x + n_y - 2 } \f$. See AveragerWeighted for details. @return t-score. If absolute=true absolute value of t-score is returned */ double score(const classifier::Target& target, const classifier::DataLookupWeighted1D& value);
 r616 // $Id$ #include #include #include #include #include #include #include #include #include statistics::WilcoxonFoldChange wfc(true); *error << "testing SAM" << std::endl; statistics::SAM sam(1.0,true); if (ok)