1 | #ifndef _theplu_yat_statistics_snr |
---|
2 | #define _theplu_yat_statistics_snr |
---|
3 | |
---|
4 | // $Id: SNRScore.h 1486 2008-09-09 21:17:19Z jari $ |
---|
5 | |
---|
6 | /* |
---|
7 | Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson, Markus Ringnér |
---|
8 | Copyright (C) 2008 Peter Johansson |
---|
9 | |
---|
10 | This file is part of the yat library, http://dev.thep.lu.se/yat |
---|
11 | |
---|
12 | The yat library is free software; you can redistribute it and/or |
---|
13 | modify it under the terms of the GNU General Public License as |
---|
14 | published by the Free Software Foundation; either version 3 of the |
---|
15 | License, or (at your option) any later version. |
---|
16 | |
---|
17 | The yat library is distributed in the hope that it will be useful, |
---|
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
20 | General Public License for more details. |
---|
21 | |
---|
22 | You should have received a copy of the GNU General Public License |
---|
23 | along with this program; if not, write to the Free Software |
---|
24 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
25 | 02111-1307, USA. |
---|
26 | */ |
---|
27 | |
---|
28 | #include "Score.h" |
---|
29 | |
---|
30 | #include <gsl/gsl_cdf.h> |
---|
31 | |
---|
32 | namespace theplu { |
---|
33 | namespace yat { |
---|
34 | namespace utility { |
---|
35 | class VectorBase; |
---|
36 | } |
---|
37 | namespace classifier { |
---|
38 | class DataLookWeighted1D; |
---|
39 | } |
---|
40 | namespace statistics { |
---|
41 | |
---|
42 | /** |
---|
43 | @brief Class for score based on signal-to-noise ratio (SNRScore). |
---|
44 | |
---|
45 | Also |
---|
46 | sometimes referred to as Golub score. The score is the ratio |
---|
47 | between difference in mean and the sum of standard deviations |
---|
48 | for two groups: \f$ \frac{ m_x-m_y}{ s_x + s_y} \f$ where \f$ |
---|
49 | s \f$ is standard deviation. |
---|
50 | */ |
---|
51 | class SNRScore : public Score |
---|
52 | { |
---|
53 | |
---|
54 | public: |
---|
55 | /// |
---|
56 | /// @brief Default Constructor. |
---|
57 | /// |
---|
58 | SNRScore(bool absolute=true); |
---|
59 | |
---|
60 | /// |
---|
61 | /// @brief The destructor. |
---|
62 | /// |
---|
63 | virtual ~SNRScore(void); |
---|
64 | |
---|
65 | /** |
---|
66 | SNRScore is defined as \f$ \frac{m_x-m_y}{s_x+s_y} \f$ where \f$ m |
---|
67 | \f$ and \f$ s \f$ are mean and standard deviation, |
---|
68 | respectively. @see Averager |
---|
69 | |
---|
70 | @return SNRScore score. If absolute=true absolute value of SNRScore is |
---|
71 | returned |
---|
72 | */ |
---|
73 | double score(const classifier::Target& target, |
---|
74 | const utility::VectorBase& value) const; |
---|
75 | |
---|
76 | /** |
---|
77 | SNRScore is defined as \f$ \frac{m_x-m_y}{s_x+s_y} \f$ where \f$ m |
---|
78 | \f$ and \f$ s \f$ are weighted versions of mean and standard |
---|
79 | deviation, respectively. @see AveragerWeighted |
---|
80 | |
---|
81 | @return SNRScore score. If absolute=true absolute value of SNRScore is |
---|
82 | returned |
---|
83 | */ |
---|
84 | double score(const classifier::Target& target, |
---|
85 | const classifier::DataLookupWeighted1D& value) const; |
---|
86 | |
---|
87 | /** |
---|
88 | SNRScore is defined as \f$ \frac{m_x-m_y}{s_x+s_y} \f$ where \f$ m |
---|
89 | \f$ and \f$ s \f$ are weighted versions of mean and standard |
---|
90 | deviation, respectively. @see AveragerWeighted |
---|
91 | |
---|
92 | @return SNRScore score. If absolute=true absolute value of SNRScore is |
---|
93 | returned |
---|
94 | */ |
---|
95 | double score(const classifier::Target& target, |
---|
96 | const utility::VectorBase& value, |
---|
97 | const utility::VectorBase& weight) const; |
---|
98 | |
---|
99 | }; |
---|
100 | |
---|
101 | |
---|
102 | }}} // of namespace statistics, yat, and theplu |
---|
103 | |
---|
104 | #endif |
---|