source: trunk/c++_tools/classifier/IGP.h @ 581

Last change on this file since 581 was 581, checked in by Markus Ringnér, 15 years ago

Added class for in-group-proportions score. Removed gslapi::vector dependence on DataLookup1D by adding classifier::utility functions. Added operator[] to Target and DataLookup1D

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 970 bytes
Line 
1// $Id: IGP.h 581 2006-05-04 15:08:42Z markus $
2
3#ifndef _theplu_classifier_igp_
4#define _theplu_classifier_igp_
5
6#include <c++_tools/gslapi/matrix.h>
7
8namespace theplu {
9
10  namespace statistics {
11    class Distance;
12  }
13
14namespace classifier { 
15
16  class Target;
17  class MatrixLookup;
18
19  ///
20  /// @brief Class for In Group Proportions (IGP)
21  /// See Kapp and Tibshirani, Biostatistics (2006).
22  ///
23  class IGP
24  {
25 
26  public:
27    ///
28    /// Constructor taking the training data, the target vector and
29    /// the distance measure as input.
30    ///
31    IGP(const MatrixLookup&, const Target&, const statistics::Distance&);
32
33    ///
34    /// Destrucutor
35    ///
36    virtual ~IGP();
37
38    ///
39    /// @return the IGP score for each class as elements in a vector.
40    ///
41    const gslapi::vector& score(void) const {return igp_;}
42
43
44  private:
45    gslapi::vector igp_;
46
47    const statistics::Distance& distance_;
48    const MatrixLookup& matrix_;
49    const Target& target_;
50  }; 
51 
52}} // of namespace classifier and namespace theplu
53
54#endif
Note: See TracBrowser for help on using the repository browser.