1 | #ifndef _theplu_yat_normalizer_quantile_normalizer_ |
---|
2 | #define _theplu_yat_normalizer_quantile_normalizer_ |
---|
3 | |
---|
4 | // $Id: QuantileNormalizer.h 1577 2008-10-14 13:49:49Z peter $ |
---|
5 | |
---|
6 | /* |
---|
7 | Copyright (C) 2008 Peter Johansson |
---|
8 | |
---|
9 | This file is part of the yat library, http://dev.thep.lu.se/yat |
---|
10 | |
---|
11 | The yat library is free software; you can redistribute it and/or |
---|
12 | modify it under the terms of the GNU General Public License as |
---|
13 | published by the Free Software Foundation; either version 3 of the |
---|
14 | License, or (at your option) any later version. |
---|
15 | |
---|
16 | The yat library is distributed in the hope that it will be useful, |
---|
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
19 | General Public License for more details. |
---|
20 | |
---|
21 | You should have received a copy of the GNU General Public License |
---|
22 | along with yat. If not, see <http://www.gnu.org/licenses/>. |
---|
23 | */ |
---|
24 | |
---|
25 | namespace theplu { |
---|
26 | namespace yat { |
---|
27 | namespace utility { |
---|
28 | class Matrix; |
---|
29 | } |
---|
30 | namespace normalizer { |
---|
31 | |
---|
32 | /** |
---|
33 | \brief Perform quantile normalization |
---|
34 | |
---|
35 | After a quantile normalization each column has the same |
---|
36 | distribution of data (the quantiles are the same). Also, within |
---|
37 | each column the rank of an element is not changed. The |
---|
38 | distribution that each column follows is determined by taking the |
---|
39 | average across columns, i.e., the largest element in each column |
---|
40 | will be equal to the average of the largest elements. The 2nd |
---|
41 | largest element in each column will be equal to the average of |
---|
42 | the 2nd largest element in eacc column et cetera. |
---|
43 | |
---|
44 | There is currently no weighted version of QuantileNormalizer |
---|
45 | |
---|
46 | \since New in yat 0.5 |
---|
47 | */ |
---|
48 | class QuantileNormalizer |
---|
49 | { |
---|
50 | public: |
---|
51 | /** |
---|
52 | \brief perform the quantile normalization. |
---|
53 | |
---|
54 | It is possible to normalize "in place"; it is permissible for |
---|
55 | \a matrix and \a result to reference to the same Matrix. |
---|
56 | |
---|
57 | \note dimensions of \a matrix and \a result must match. |
---|
58 | */ |
---|
59 | void operator()(const utility::Matrix& matrix, |
---|
60 | utility::Matrix& result) const; |
---|
61 | }; |
---|
62 | |
---|
63 | }}} // end of namespace normalizer, yat and thep |
---|
64 | #endif |
---|