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

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

merge patch release 0.4.2 to trunk. Delta 0.4.2-0.4.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1#ifndef _theplu_yat_statistics_wilcoxonfoldchange_
2#define _theplu_yat_statistics_wilcoxonfoldchange_
3
4// $Id: WilcoxonFoldChange.h 1437 2008-08-25 17:55:00Z peter $
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 2 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 this program; if not, write to the Free Software
25  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26  02111-1307, USA.
27*/
28
29#include "Score.h"
30
31namespace theplu {
32namespace yat {
33  namespace utility {
34    class VectorBase;
35  }
36namespace statistics {
37
38  /**
39     @brief WilcoxonFoldChange
40     
41     WilcoxonFoldChange is calculated as follows: Having \f$ n_+ \f$
42     samples from class + and \f$ n_- \f$ from class -, all \f$ n_+
43     n_- \f$ pairwise distances are calculated, and the
44     WilcoxonFoldChange is the median of these values.
45  */
46  class WilcoxonFoldChange : public Score
47  {
48  public:
49
50    ///
51    /// @brief Default Constructor
52    ///
53    WilcoxonFoldChange(bool absolute=true);
54
55    ///
56    /// @return median of all pairwise differences
57    ///
58    /// @param target defining the two groups (Target.binary() )
59    /// @param value vector of the values
60    ///
61    double score(const classifier::Target& target, 
62                 const utility::VectorBase& value) const; 
63 
64    ///
65    /// @return difference of the weighted means of the two classes
66    ///
67    /// @param target defining the two groups (Target.binary() )
68    /// @param value vector of the values (with weights)
69    ///
70    /// @note not implemented
71    ///
72    double score(const classifier::Target& target, 
73                 const classifier::DataLookupWeighted1D& value) const; 
74 
75    ///
76    /// @return difference of the weighted means of the two classes
77    ///
78    /// @param target defining the two groups
79    /// @param value vector of the values
80    /// @param weight vector of accompanied weight to the values
81    ///
82    /// @note not implemented
83    ///
84    double score(const classifier::Target& target, 
85                 const utility::VectorBase& value, 
86                 const utility::VectorBase& weight) const; 
87 
88  private:
89
90    ///
91    /// @brief Copy Constructor
92    ///
93    WilcoxonFoldChange(const WilcoxonFoldChange&);
94
95    ///
96    /// @brief Assignment operator
97    ///
98    WilcoxonFoldChange& operator=(const WilcoxonFoldChange&);
99  };
100
101}}} // of namespace statistics, yat, and theplu
102
103#endif
Note: See TracBrowser for help on using the repository browser.