1 | #ifndef _theplu_yat_statistics_foldchange_ |
---|
2 | #define _theplu_yat_statistics_foldchange_ |
---|
3 | |
---|
4 | // $Id: FoldChange.h 1486 2008-09-09 21:17:19Z 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 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 | |
---|
31 | namespace theplu { |
---|
32 | namespace yat { |
---|
33 | class utility::VectorBase; |
---|
34 | namespace statistics { |
---|
35 | |
---|
36 | /// |
---|
37 | /// @brief Score given by the difference by the group means. |
---|
38 | /// |
---|
39 | class FoldChange : public Score |
---|
40 | { |
---|
41 | public: |
---|
42 | |
---|
43 | /// |
---|
44 | /// @brief Default Constructor |
---|
45 | /// |
---|
46 | FoldChange(bool absolute=true); |
---|
47 | |
---|
48 | /// |
---|
49 | /// @return difference of the means of the two classes |
---|
50 | /// |
---|
51 | /// @param target |
---|
52 | /// @param value vector of the values |
---|
53 | /// |
---|
54 | double score(const classifier::Target& target, |
---|
55 | const utility::VectorBase& value) const; |
---|
56 | |
---|
57 | /// |
---|
58 | /// @return difference of the means of the two classes |
---|
59 | /// |
---|
60 | /// @param target |
---|
61 | /// @param value vector of the values (with weights) |
---|
62 | /// |
---|
63 | double score(const classifier::Target& target, |
---|
64 | const classifier::DataLookupWeighted1D& value) const; |
---|
65 | |
---|
66 | /// |
---|
67 | /// @return difference of the weighted means of the two classes |
---|
68 | /// |
---|
69 | /// @param target |
---|
70 | /// @param value vector of the values |
---|
71 | /// @param weight vector of accompanied weight to the values |
---|
72 | /// |
---|
73 | double score(const classifier::Target& target, |
---|
74 | const utility::VectorBase& value, |
---|
75 | const utility::VectorBase& weight) const; |
---|
76 | |
---|
77 | private: |
---|
78 | |
---|
79 | /// |
---|
80 | /// @brief Copy Constructor |
---|
81 | /// |
---|
82 | FoldChange(const FoldChange&); |
---|
83 | |
---|
84 | /// |
---|
85 | /// @brief Assignment operator |
---|
86 | /// |
---|
87 | FoldChange& operator=(const FoldChange&); |
---|
88 | |
---|
89 | }; |
---|
90 | |
---|
91 | }}} // of namespace statistics, yat, and theplu |
---|
92 | |
---|
93 | #endif |
---|