680 |
11 Oct 06 |
jari |
1 |
#ifndef _theplu_yat_statistics_foldchange_ |
680 |
11 Oct 06 |
jari |
2 |
#define _theplu_yat_statistics_foldchange_ |
414 |
01 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 |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2009 Peter Johansson |
675 |
10 Oct 06 |
jari |
12 |
|
1437 |
25 Aug 08 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
675 |
10 Oct 06 |
jari |
14 |
|
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 |
19 |
|
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 |
24 |
|
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 |
27 |
*/ |
675 |
10 Oct 06 |
jari |
28 |
|
414 |
01 Dec 05 |
peter |
29 |
#include "Score.h" |
414 |
01 Dec 05 |
peter |
30 |
|
414 |
01 Dec 05 |
peter |
31 |
namespace theplu { |
680 |
11 Oct 06 |
jari |
32 |
namespace yat { |
2055 |
08 Sep 09 |
peter |
33 |
namespace utility { |
2055 |
08 Sep 09 |
peter |
34 |
class VectorBase; |
2055 |
08 Sep 09 |
peter |
35 |
} |
414 |
01 Dec 05 |
peter |
36 |
namespace statistics { |
414 |
01 Dec 05 |
peter |
37 |
|
414 |
01 Dec 05 |
peter |
38 |
/// |
767 |
22 Feb 07 |
peter |
/// @brief Score given by the difference by the group means. |
414 |
01 Dec 05 |
peter |
40 |
/// |
414 |
01 Dec 05 |
peter |
41 |
class FoldChange : public Score |
414 |
01 Dec 05 |
peter |
42 |
{ |
414 |
01 Dec 05 |
peter |
43 |
public: |
414 |
01 Dec 05 |
peter |
44 |
|
4200 |
19 Aug 22 |
peter |
45 |
/// |
4200 |
19 Aug 22 |
peter |
/// @brief Default Constructor |
4200 |
19 Aug 22 |
peter |
47 |
/// |
414 |
01 Dec 05 |
peter |
48 |
FoldChange(bool absolute=true); |
414 |
01 Dec 05 |
peter |
49 |
|
414 |
01 Dec 05 |
peter |
50 |
/// |
414 |
01 Dec 05 |
peter |
/// @return difference of the means of the two classes |
414 |
01 Dec 05 |
peter |
52 |
/// |
4200 |
19 Aug 22 |
peter |
/// @param target |
414 |
01 Dec 05 |
peter |
/// @param value vector of the values |
414 |
01 Dec 05 |
peter |
55 |
/// |
4200 |
19 Aug 22 |
peter |
56 |
double score(const classifier::Target& target, |
4200 |
19 Aug 22 |
peter |
57 |
const utility::VectorBase& value) const; |
4200 |
19 Aug 22 |
peter |
58 |
|
4200 |
19 Aug 22 |
peter |
59 |
/// |
623 |
05 Sep 06 |
peter |
/// @return difference of the means of the two classes |
623 |
05 Sep 06 |
peter |
61 |
/// |
4200 |
19 Aug 22 |
peter |
/// @param target |
623 |
05 Sep 06 |
peter |
/// @param value vector of the values (with weights) |
623 |
05 Sep 06 |
peter |
64 |
/// |
4200 |
19 Aug 22 |
peter |
65 |
double score(const classifier::Target& target, |
4200 |
19 Aug 22 |
peter |
66 |
const classifier::DataLookupWeighted1D& value) const; |
4200 |
19 Aug 22 |
peter |
67 |
|
4200 |
19 Aug 22 |
peter |
68 |
/// |
414 |
01 Dec 05 |
peter |
/// @return difference of the weighted means of the two classes |
414 |
01 Dec 05 |
peter |
70 |
/// |
4200 |
19 Aug 22 |
peter |
/// @param target |
414 |
01 Dec 05 |
peter |
/// @param value vector of the values |
414 |
01 Dec 05 |
peter |
/// @param weight vector of accompanied weight to the values |
4200 |
19 Aug 22 |
peter |
74 |
/// |
4200 |
19 Aug 22 |
peter |
75 |
double score(const classifier::Target& target, |
1023 |
01 Feb 08 |
peter |
76 |
const utility::VectorBase& value, |
4200 |
19 Aug 22 |
peter |
77 |
const utility::VectorBase& weight) const; |
4200 |
19 Aug 22 |
peter |
78 |
|
414 |
01 Dec 05 |
peter |
79 |
private: |
414 |
01 Dec 05 |
peter |
80 |
|
4200 |
19 Aug 22 |
peter |
81 |
/// |
4200 |
19 Aug 22 |
peter |
/// @brief Copy Constructor |
4200 |
19 Aug 22 |
peter |
83 |
/// |
414 |
01 Dec 05 |
peter |
84 |
FoldChange(const FoldChange&); |
414 |
01 Dec 05 |
peter |
85 |
|
414 |
01 Dec 05 |
peter |
86 |
/// |
414 |
01 Dec 05 |
peter |
/// @brief Assignment operator |
414 |
01 Dec 05 |
peter |
88 |
/// |
414 |
01 Dec 05 |
peter |
89 |
FoldChange& operator=(const FoldChange&); |
414 |
01 Dec 05 |
peter |
90 |
|
414 |
01 Dec 05 |
peter |
91 |
}; |
414 |
01 Dec 05 |
peter |
92 |
|
680 |
11 Oct 06 |
jari |
93 |
}}} // of namespace statistics, yat, and theplu |
414 |
01 Dec 05 |
peter |
94 |
|
414 |
01 Dec 05 |
peter |
95 |
#endif |