source: trunk/yat/normalizer/QuantileNormalizer.h @ 1518

Last change on this file since 1518 was 1518, checked in by Peter, 13 years ago

changed implementation of a couple of normalizer so that operator() takes two matrices of which one is an input marix and one is a result matrix, i.e., the result does only depend on the input matrix and the result is only used as a receiver - I think this behaviour is more intuitive, although it is not as general as the previous one. We should probably document somewhere how we expect a 2Dnormalizer to behave (refs #425).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1#ifndef _theplu_yat_normalizer_quantile_normalizer_
2#define _theplu_yat_normalizer_quantile_normalizer_
3
4/*
5  Copyright (C) 2008 Peter Johansson
6
7  This file is part of the yat library, http://dev.thep.lu.se/yat
8
9  The yat library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 3 of the
12  License, or (at your option) any later version.
13
14  The yat library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with yat. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23namespace theplu {
24namespace yat {
25namespace utility {
26  class Matrix;
27}
28namespace normalizer {
29
30  /**
31     \brief Perform quantile normalization
32
33     \since New in yat 0.5
34   */
35  class QuantileNormalizer
36  {
37  public:
38    /**
39       The \a matrix is normalized by sorting each column, replacing
40       each value with the average across rows, and undo the sorting
41       in step 1. This results in a Matrix \a result in which each
42       column has the same distribution of data, and the rank of an
43       element within a column is the same as in \a matrix.
44
45       \note dimensions of \a matrix and \a result must match.
46     */
47    void operator()(const utility::Matrix& matrix,
48                    utility::Matrix& result) const;
49  };
50
51}}} // end of namespace normalizer, yat and thep
52#endif
Note: See TracBrowser for help on using the repository browser.