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

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

set properties

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