source: branches/peters_vector/lib/classifier/InputRanker.h @ 469

Last change on this file since 469 was 469, checked in by Peter, 16 years ago

non compiling checking before revision after design meeting

  • 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 469 2005-12-19 14:58:29Z 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 DataView;
19  class Target;
20
21  ///
22  /// Class for ranking rows in a matrix, using a Score and a
23  /// target vector.
24  ///   
25  class InputRanker
26  {
27
28  public:
29    ///
30    /// Constructor taking data, target, a Score
31    /// object and vector defining what samples to use (default is to
32    /// use all samples)
33    ///
34    InputRanker(const DataView&, const Target&, statistics::Score&); 
35
36
37    ///
38    /// Constructor taking data, target, weight, pointer to a Score
39    /// object and vector defining what samples to use (default is to
40    /// use all samples)
41    ///
42    InputRanker(const DataView&, const Target&, statistics::Score&, 
43                const DataView&); 
44
45
46    ///
47    /// highest ranked gene is ranked as number zero @return id
48    /// (index) of input ranked as number \a i
49    ///
50    inline size_t id(const size_t i) const {return id_[i];}
51
52    ///
53    /// highest ranked gene is ranked as number zero @return rank for
54    /// id (column) \a i
55    ///
56    inline size_t rank(const size_t i) const {return rank_[i];}
57
58
59  private:
60    std::vector<size_t> train_set_;
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.