source: trunk/c++_tools/classifier/InputRanker.h @ 617

Last change on this file since 617 was 617, checked in by Jari Häkkinen, 17 years ago

Cleaned up stray gslapi stuff.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date ID
File size: 1.4 KB
Line 
1// $Id$
2
3#ifndef _theplu_classifier_inputranker_
4#define _theplu_classifier_inputranker_
5
6#include <vector>
7
8namespace theplu {
9namespace statistics {
10  class Score;
11}
12namespace classifier { 
13
14  class DataLookup2D;
15  class MatrixLookup;
16  class Target;
17
18  ///
19  /// Class for ranking rows in a matrix, using a Score and a
20  /// target vector.
21  ///   
22  class InputRanker
23  {
24
25  public:
26    ///
27    /// Constructor taking data, target, a Score
28    /// object and vector defining what samples to use (default is to
29    /// use all samples)
30    ///
31    InputRanker(const DataLookup2D&, const Target&, statistics::Score&); 
32
33
34    ///
35    /// Constructor taking data, target, weight, pointer to a Score
36    /// object and vector defining what samples to use (default is to
37    /// use all samples)
38    ///
39    InputRanker(const DataLookup2D&, const Target&, statistics::Score&, 
40                const MatrixLookup&); 
41
42
43    ///
44    /// highest ranked gene is ranked as number zero @return id
45    /// (index) of input ranked as number \a i
46    ///
47    inline const std::vector<size_t>& id(void) const {return id_;}
48
49    ///
50    /// highest ranked gene is ranked as number zero @return rank for
51    /// id (column) \a i
52    ///
53    inline const std::vector<size_t> rank(void) const {return rank_;}
54
55
56  private:
57    std::vector<size_t> id_;
58    std::vector<size_t> rank_;
59  };
60
61
62}} // of namespace classifier and namespace theplu
63
64#endif
Note: See TracBrowser for help on using the repository browser.