source: trunk/src/tScore.h @ 102

Last change on this file since 102 was 102, checked in by Peter, 18 years ago

Fixed bug in interface between InputRanker? & ROC

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1// $Id: tScore.h 102 2004-06-15 09:40:52Z peter $
2
3#ifndef _theplu_cpptools_t_score_
4#define _theplu_cpptools_t_score_
5
6// C++ tools include
7/////////////////////
8#include "Score.h"
9#include "vector.h"
10#include <gsl/gsl_cdf.h>
11
12// Standard C++ includes
13////////////////////////
14//#include <utility>
15//#include <vector>
16
17namespace theplu {
18namespace cpptools { 
19  ///
20  /// Class for Fisher's t-test.
21  ///   
22 
23  class tScore : public Score
24  {
25 
26  public:
27    ///
28    /// Default Constructor.
29    ///
30    tScore();
31
32    ///
33    /// Constructor taking a value vector and a target vector (+1 or -1).
34    ///
35    tScore(const gslapi::vector&, const gslapi::vector&);
36         
37    ///
38    /// Destructor
39    ///
40    virtual ~tScore(void) {};
41         
42   
43    ///
44    /// Calculates the t-score, i.e. the ratio between difference in
45    /// mean and standard deviation of this difference.
46    /// @return \f$ \frac{\frac{1}{n_x}\sum x_i - \frac{1}{n_y}\sum y_i}
47    /// {\frac{\sum x_i^2 + \sum y_i^2}{n_x-1+n_y-1}} \f$
48    ///
49    double score();
50       
51    ///
52    ///Calculates the p-value, i.e. the probability of observing a t-score
53    ///equally or larger if the null hypothesis is true. If P is near zero,
54    ///this casts doubt on this hypothesis. The null hypothesis is ...
55    /// @return the one-sided p-value
56    ///
57    double p_value();
58         
59  private:
60    gslapi::vector value_;
61    gslapi::vector target_;
62   
63       
64  };
65
66}} // of namespace cpptools and namespace theplu
67
68#endif
69
Note: See TracBrowser for help on using the repository browser.