source: trunk/yat/statistics/WilcoxonFoldChange.h @ 1701

Last change on this file since 1701 was 1487, checked in by Jari Häkkinen, 13 years ago

Addresses #436. GPL license copy reference should also be updated.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1#ifndef _theplu_yat_statistics_wilcoxonfoldchange_
2#define _theplu_yat_statistics_wilcoxonfoldchange_
3
4// $Id: WilcoxonFoldChange.h 1487 2008-09-10 08:41:36Z jari $
5
6/*
7  Copyright (C) 2005 Peter Johansson
8  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2008 Peter Johansson
10
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25*/
26
27#include "Score.h"
28
29namespace theplu {
30namespace yat {
31  namespace utility {
32    class VectorBase;
33  }
34namespace statistics {
35
36  /**
37     @brief WilcoxonFoldChange
38     
39     WilcoxonFoldChange is calculated as follows: Having \f$ n_+ \f$
40     samples from class + and \f$ n_- \f$ from class -, all \f$ n_+
41     n_- \f$ pairwise distances are calculated, and the
42     WilcoxonFoldChange is the median of these values.
43  */
44  class WilcoxonFoldChange : public Score
45  {
46  public:
47
48    ///
49    /// @brief Default Constructor
50    ///
51    WilcoxonFoldChange(bool absolute=true);
52
53    ///
54    /// @return median of all pairwise differences
55    ///
56    /// @param target defining the two groups (Target.binary() )
57    /// @param value vector of the values
58    ///
59    double score(const classifier::Target& target, 
60                 const utility::VectorBase& value) const; 
61 
62    ///
63    /// @return weighted median of all pairwise differences
64    ///
65    /// For each pair a DataWeight is created with value = value(i) -
66    /// value(j) and weight = weight(i)*weight(j) where sample i and
67    /// sample j come from different groups.
68    ///
69    /// @param target defining the two groups
70    /// @param value vector of the values
71    /// @param weight vector of accompanied weight to the values
72    ///
73    /// @note not implemented
74    ///
75    double score(const classifier::Target& target, 
76                 const utility::VectorBase& value, 
77                 const utility::VectorBase& weight) const; 
78 
79  private:
80
81    ///
82    /// @brief Copy Constructor
83    ///
84    WilcoxonFoldChange(const WilcoxonFoldChange&);
85
86    ///
87    /// @brief Assignment operator
88    ///
89    WilcoxonFoldChange& operator=(const WilcoxonFoldChange&);
90  };
91
92}}} // of namespace statistics, yat, and theplu
93
94#endif
Note: See TracBrowser for help on using the repository browser.