# source:trunk/c++_tools/statistics/SNR.h@616

Last change on this file since 616 was 616, checked in by Jari Häkkinen, 15 years ago

Removed gslapi namespace and put the code into utility namespace.
Removed unneccesary #includes, and added needed #includes.

• Property svn:eol-style set to native
• Property svn:keywords set to Id
File size: 1.3 KB
Line
1#ifndef _theplu_statistics_snr
2#define _theplu_statistics_snr
3
4// $Id: SNR.h 616 2006-08-31 08:52:02Z jari$
5
6#include <c++_tools/statistics/Score.h>
7
8#include <gsl/gsl_cdf.h>
9
10namespace theplu {
11  namespace utility {
12    class vector;
13  }
14namespace statistics {
15
16  ///
17  /// @brief Class for score based on signal-to-noise ratio (SNR).
18  ///
19  /// Also
20  /// sometimes referred to as Golub score. The score is the ratio
21  /// between difference in mean and the sum of standard deviations
22  /// for two groups.  \f$\frac{ \frac{1}{n_x}\sum x_i - 23 /// \frac{1}{n_y}\sum y_i }{ \sigma_x + \sigma_y} \f$ where \f$24 /// \sigma \f$ is standard deviation.
25  ///
26  class SNR : public Score
27  {
28
29  public:
30    ///
31    /// Default Constructor.
32    ///
33    SNR(bool absolute=true);
34
35    ///
36    /// Calculates the value of SNR score. @return SNR score if
37    /// absolute=true absolute value of t-score is returned
38    ///
39    double score(const classifier::Target& target,
40                 const utility::vector& value);
41
42    ///
43    /// Weighted version of SNR @return t-score if absolute=true
44    /// absolute value of t-score is returned.
45    ///
46    double score(const classifier::Target& target,
47                 const utility::vector& value,
48                 const utility::vector& weight);
49  private:
50    double score_;
51  };
52
53}} // of namespace statistics and namespace theplu
54
55#endif
56
Note: See TracBrowser for help on using the repository browser.