source: trunk/yat/statistics/WilcoxonFoldChange.h

Last change on this file was 2119, checked in by Peter, 12 years ago

converted files to utf-8. fixes #577

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