yat/statistics/SNRScore.h

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