#ifndef _theplu_yat_statistics_snr
#define _theplu_yat_statistics_snr
// $Id: SNRScore.h 1023 2008-02-01 18:12:35Z peter $
/*
Copyright (C) 2006 Jari Häkkinen, Markus Ringnér, Peter Johansson
Copyright (C) 2007 Peter Johansson
This file is part of the yat library, http://trac.thep.lu.se/yat
The yat library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The yat library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "Score.h"
#include
namespace theplu {
namespace yat {
namespace utility {
class VectorBase;
}
namespace classifier {
class DataLookWeighted1D;
}
namespace statistics {
/**
@brief Class for score based on signal-to-noise ratio (SNRScore).
Also
sometimes referred to as Golub score. The score is the ratio
between difference in mean and the sum of standard deviations
for two groups: \f$ \frac{ m_x-m_y}{ s_x + s_y} \f$ where \f$
s \f$ is standard deviation.
*/
class SNRScore : public Score
{
public:
///
/// @brief Default Constructor.
///
SNRScore(bool absolute=true);
///
/// @brief The destructor.
///
virtual ~SNRScore(void);
/**
SNRScore is defined as \f$ \frac{m_x-m_y}{s_x+s_y} \f$ where \f$ m
\f$ and \f$ s \f$ are mean and standard deviation,
respectively. @see Averager
@return SNRScore score. If absolute=true absolute value of SNRScore is
returned
*/
double score(const classifier::Target& target,
const utility::VectorBase& value) const;
/**
SNRScore is defined as \f$ \frac{m_x-m_y}{s_x+s_y} \f$ where \f$ m
\f$ and \f$ s \f$ are weighted versions of mean and standard
deviation, respectively. @see AveragerWeighted
@return SNRScore score. If absolute=true absolute value of SNRScore is
returned
*/
double score(const classifier::Target& target,
const classifier::DataLookupWeighted1D& value) const;
/**
SNRScore is defined as \f$ \frac{m_x-m_y}{s_x+s_y} \f$ where \f$ m
\f$ and \f$ s \f$ are weighted versions of mean and standard
deviation, respectively. @see AveragerWeighted
@return SNRScore score. If absolute=true absolute value of SNRScore is
returned
*/
double score(const classifier::Target& target,
const utility::VectorBase& value,
const utility::VectorBase& weight) const;
};
}}} // of namespace statistics, yat, and theplu
#endif