source: trunk/yat/statistics/FoldChange.h @ 1706

Last change on this file since 1706 was 1487, checked in by Jari Häkkinen, 13 years ago

Addresses #436. GPL license copy reference should also be updated.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1#ifndef _theplu_yat_statistics_foldchange_
2#define _theplu_yat_statistics_foldchange_
3
4// $Id: FoldChange.h 1487 2008-09-10 08:41:36Z 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 yat. If not, see <http://www.gnu.org/licenses/>.
25*/
26
27#include "Score.h"
28
29namespace theplu {
30namespace yat {
31  class utility::VectorBase;
32namespace statistics {
33
34  ///
35  /// @brief Score given by the difference by the group means.
36  ///
37  class FoldChange : public Score
38  {
39  public:
40
41    ///
42    /// @brief Default Constructor
43    ///
44    FoldChange(bool absolute=true);
45
46    ///
47    /// @return difference of the means of the two classes
48    ///
49    /// @param target
50    /// @param value vector of the values
51    ///
52    double score(const classifier::Target& target, 
53                 const utility::VectorBase& value) const; 
54 
55    ///
56    /// @return difference of the means of the two classes
57    ///
58    /// @param target
59    /// @param value vector of the values (with weights)
60    ///
61    double score(const classifier::Target& target, 
62                 const classifier::DataLookupWeighted1D& value) const; 
63 
64    ///
65    /// @return difference of the weighted means of the two classes
66    ///
67    /// @param target
68    /// @param value vector of the values
69    /// @param weight vector of accompanied weight to the values
70    ///
71    double score(const classifier::Target& target, 
72                 const utility::VectorBase& value,
73                 const utility::VectorBase& weight) const; 
74 
75  private:
76
77    ///
78    /// @brief Copy Constructor
79    ///
80    FoldChange(const FoldChange&);
81
82    ///
83    /// @brief Assignment operator
84    ///
85    FoldChange& operator=(const FoldChange&);
86
87  };
88
89}}} // of namespace statistics, yat, and theplu
90
91#endif
Note: See TracBrowser for help on using the repository browser.