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

Last change on this file since 604 was 604, checked in by Peter, 15 years ago

ref #96 Changed InputRanker? to return vector of index rather than element. Also added draft to FeatureSelection? class.

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