source: trunk/c++_tools/statistics/FoldChange.h @ 623

Last change on this file since 623 was 623, checked in by Peter, 17 years ago

fixes #112 and refs #123 added overloaded function score taking Target and DataLookupWeighted1D, which is needed for InputRanker?.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifndef _theplu_statistics_foldchange_
2#define _theplu_statistics_foldchange_
3
4// $Id: FoldChange.h 623 2006-09-05 02:13:12Z peter $
5
6#include "Score.h"
7
8namespace theplu {
9
10  class utility::vector;
11
12
13namespace statistics {
14
15  ///
16  /// @brief FoldChange
17  ///
18  /// This score is simply given by the difference by the group means.
19  ///
20  class FoldChange : public Score
21  {
22  public:
23
24    ///
25    /// @brief Default Constructor
26    ///
27    FoldChange(bool absolute=true);
28
29    ///
30    /// @return difference of the means of the two classes
31    ///
32    /// @param target
33    /// @param value vector of the values
34    ///
35    double score(const classifier::Target& target, 
36                 const utility::vector& value); 
37 
38    ///
39    /// @return difference of the means of the two classes
40    ///
41    /// @param target
42    /// @param value vector of the values (with weights)
43    ///
44    double score(const classifier::Target& target, 
45                 const classifier::DataLookupWeighted1D& value); 
46 
47    ///
48    /// @return difference of the weighted means of the two classes
49    ///
50    /// @param target
51    /// @param value vector of the values
52    /// @param weight vector of accompanied weight to the values
53    /// @train_set defining which values to use (number of values used
54    /// in the calculation is equal to size of \a train_set)
55    ///
56    double score(const classifier::Target& target, 
57                 const utility::vector& value,
58                 const utility::vector& weight); 
59 
60  private:
61
62    ///
63    /// @brief Copy Constructor
64    ///
65    FoldChange(const FoldChange&);
66
67    ///
68    /// @brief Assignment operator
69    ///
70    FoldChange& operator=(const FoldChange&);
71
72  };
73
74} // of namespace statistics
75} // of namespace theplu
76
77#endif
Note: See TracBrowser for help on using the repository browser.