#ifndef _theplu_yat_normalizer_quantile_normalizer_
#define _theplu_yat_normalizer_quantile_normalizer_
// $Id: QuantileNormalizer.h 1578 2008-10-14 19:01:02Z peter $
/*
Copyright (C) 2008 Peter Johansson
This file is part of the yat library, http://dev.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 3 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 yat. If not, see .
*/
namespace theplu {
namespace yat {
namespace utility {
class Matrix;
}
namespace normalizer {
/**
\brief Perform quantile normalization
After a quantile normalization each column has the same
distribution of data (the quantiles are the same). Also, within
each column the rank of an element is not changed. The
distribution that each column follows is determined by taking the
average across columns, i.e., the largest element in each column
will be equal to the average of the largest elements. The 2nd
largest element in each column will be equal to the average of
the 2nd largest element in each column et cetera.
There is currently no weighted version of QuantileNormalizer
\since New in yat 0.5
*/
class QuantileNormalizer
{
public:
/**
\brief perform the quantile normalization.
It is possible to normalize "in place"; it is permissible for
\a matrix and \a result to reference to the same Matrix.
\note dimensions of \a matrix and \a result must match.
*/
void operator()(const utility::Matrix& matrix,
utility::Matrix& result) const;
};
}}} // end of namespace normalizer, yat and thep
#endif