680 |
11 Oct 06 |
jari |
1 |
#ifndef _theplu_yat_statistics_wilcoxonfoldchange_ |
680 |
11 Oct 06 |
jari |
2 |
#define _theplu_yat_statistics_wilcoxonfoldchange_ |
461 |
16 Dec 05 |
peter |
3 |
|
616 |
31 Aug 06 |
jari |
// $Id$ |
616 |
31 Aug 06 |
jari |
5 |
|
675 |
10 Oct 06 |
jari |
6 |
/* |
831 |
27 Mar 07 |
peter |
Copyright (C) 2005 Peter Johansson |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2006 Jari Häkkinen, Peter Johansson |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2007 Peter Johansson |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2008 Jari Häkkinen, Peter Johansson |
461 |
16 Dec 05 |
peter |
11 |
|
1437 |
25 Aug 08 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
675 |
10 Oct 06 |
jari |
13 |
|
675 |
10 Oct 06 |
jari |
The yat library is free software; you can redistribute it and/or |
675 |
10 Oct 06 |
jari |
modify it under the terms of the GNU General Public License as |
1486 |
09 Sep 08 |
jari |
published by the Free Software Foundation; either version 3 of the |
675 |
10 Oct 06 |
jari |
License, or (at your option) any later version. |
675 |
10 Oct 06 |
jari |
18 |
|
675 |
10 Oct 06 |
jari |
The yat library is distributed in the hope that it will be useful, |
675 |
10 Oct 06 |
jari |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
675 |
10 Oct 06 |
jari |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
675 |
10 Oct 06 |
jari |
General Public License for more details. |
675 |
10 Oct 06 |
jari |
23 |
|
675 |
10 Oct 06 |
jari |
You should have received a copy of the GNU General Public License |
1487 |
10 Sep 08 |
jari |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
675 |
10 Oct 06 |
jari |
26 |
*/ |
675 |
10 Oct 06 |
jari |
27 |
|
680 |
11 Oct 06 |
jari |
28 |
#include "Score.h" |
675 |
10 Oct 06 |
jari |
29 |
|
461 |
16 Dec 05 |
peter |
30 |
namespace theplu { |
680 |
11 Oct 06 |
jari |
31 |
namespace yat { |
616 |
31 Aug 06 |
jari |
32 |
namespace utility { |
1023 |
01 Feb 08 |
peter |
33 |
class VectorBase; |
616 |
31 Aug 06 |
jari |
34 |
} |
461 |
16 Dec 05 |
peter |
35 |
namespace statistics { |
461 |
16 Dec 05 |
peter |
36 |
|
1315 |
19 May 08 |
peter |
37 |
/** |
4200 |
19 Aug 22 |
peter |
@brief WilcoxonFoldChange |
4200 |
19 Aug 22 |
peter |
39 |
|
1315 |
19 May 08 |
peter |
WilcoxonFoldChange is calculated as follows: Having \f$ n_+ \f$ |
1315 |
19 May 08 |
peter |
samples from class + and \f$ n_- \f$ from class -, all \f$ n_+ |
1315 |
19 May 08 |
peter |
n_- \f$ pairwise distances are calculated, and the |
1315 |
19 May 08 |
peter |
WilcoxonFoldChange is the median of these values. |
1315 |
19 May 08 |
peter |
44 |
*/ |
461 |
16 Dec 05 |
peter |
45 |
class WilcoxonFoldChange : public Score |
461 |
16 Dec 05 |
peter |
46 |
{ |
461 |
16 Dec 05 |
peter |
47 |
public: |
461 |
16 Dec 05 |
peter |
48 |
|
4200 |
19 Aug 22 |
peter |
49 |
/// |
4200 |
19 Aug 22 |
peter |
/// @brief Default Constructor |
4200 |
19 Aug 22 |
peter |
51 |
/// |
461 |
16 Dec 05 |
peter |
52 |
WilcoxonFoldChange(bool absolute=true); |
461 |
16 Dec 05 |
peter |
53 |
|
461 |
16 Dec 05 |
peter |
54 |
/// |
1315 |
19 May 08 |
peter |
/// @return median of all pairwise differences |
461 |
16 Dec 05 |
peter |
56 |
/// |
648 |
14 Sep 06 |
peter |
/// @param target defining the two groups (Target.binary() ) |
461 |
16 Dec 05 |
peter |
/// @param value vector of the values |
4200 |
19 Aug 22 |
peter |
59 |
/// |
4200 |
19 Aug 22 |
peter |
60 |
double score(const classifier::Target& target, |
4200 |
19 Aug 22 |
peter |
61 |
const utility::VectorBase& value) const; |
4200 |
19 Aug 22 |
peter |
62 |
|
4200 |
19 Aug 22 |
peter |
63 |
/// |
1471 |
02 Sep 08 |
peter |
/// @return weighted median of all pairwise differences |
4200 |
19 Aug 22 |
peter |
65 |
/// |
1471 |
02 Sep 08 |
peter |
/// For each pair a DataWeight is created with value = value(i) - |
1471 |
02 Sep 08 |
peter |
/// value(j) and weight = weight(i)*weight(j) where sample i and |
1471 |
02 Sep 08 |
peter |
/// sample j come from different groups. |
623 |
05 Sep 06 |
peter |
69 |
/// |
4200 |
19 Aug 22 |
peter |
/// @param target defining the two groups |
461 |
16 Dec 05 |
peter |
/// @param value vector of the values |
461 |
16 Dec 05 |
peter |
/// @param weight vector of accompanied weight to the values |
465 |
16 Dec 05 |
peter |
73 |
/// |
465 |
16 Dec 05 |
peter |
/// @note not implemented |
465 |
16 Dec 05 |
peter |
75 |
/// |
4200 |
19 Aug 22 |
peter |
76 |
double score(const classifier::Target& target, |
4200 |
19 Aug 22 |
peter |
77 |
const utility::VectorBase& value, |
4200 |
19 Aug 22 |
peter |
78 |
const utility::VectorBase& weight) const; |
4200 |
19 Aug 22 |
peter |
79 |
|
461 |
16 Dec 05 |
peter |
80 |
private: |
461 |
16 Dec 05 |
peter |
81 |
|
4200 |
19 Aug 22 |
peter |
82 |
/// |
4200 |
19 Aug 22 |
peter |
/// @brief Copy Constructor |
4200 |
19 Aug 22 |
peter |
84 |
/// |
461 |
16 Dec 05 |
peter |
85 |
WilcoxonFoldChange(const WilcoxonFoldChange&); |
461 |
16 Dec 05 |
peter |
86 |
|
461 |
16 Dec 05 |
peter |
87 |
/// |
461 |
16 Dec 05 |
peter |
/// @brief Assignment operator |
461 |
16 Dec 05 |
peter |
89 |
/// |
461 |
16 Dec 05 |
peter |
90 |
WilcoxonFoldChange& operator=(const WilcoxonFoldChange&); |
461 |
16 Dec 05 |
peter |
91 |
}; |
461 |
16 Dec 05 |
peter |
92 |
|
680 |
11 Oct 06 |
jari |
93 |
}}} // of namespace statistics, yat, and theplu |
461 |
16 Dec 05 |
peter |
94 |
|
461 |
16 Dec 05 |
peter |
95 |
#endif |