yat  0.14.5pre
InputRanker.h
1 #ifndef _theplu_yat_classifier_inputranker_
2 #define _theplu_yat_classifier_inputranker_
3 
4 // $Id: InputRanker.h 2986 2013-02-18 08:07:44Z peter $
5 
6 /*
7  Copyright (C) 2004 Peter Johansson
8  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2013 Jari Häkkinen
10 
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12 
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17 
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #include <cstddef>
28 #include <vector>
29 
30 namespace theplu {
31 namespace yat {
32 namespace statistics {
33  class Score;
34 }
35 namespace classifier {
36 
37  class MatrixLookup;
38  class MatrixLookupWeighted;
39  class Target;
40 
46  {
47 
48  public:
54  InputRanker(const MatrixLookup&, const Target&, const statistics::Score&);
55 
61  InputRanker(const MatrixLookupWeighted&, const Target&,
62  const statistics::Score&);
63 
68  const std::vector<size_t>& id(void) const;
69 
74  const std::vector<size_t>& rank(void) const;
75 
84  double score(size_t rank) const;
85 
86  private:
87  std::vector<size_t> id_;
88  std::vector<size_t> rank_;
89  std::vector<double> score_;
90  };
91 
92 
93 }}} // of namespace classifier, yat, and theplu
94 
95 #endif
General view into utility::Matrix.
Definition: MatrixLookup.h:70
Class for containing sample labels.
Definition: Target.h:47
double score(size_t rank) const
General view into utility::MatrixWeighted.
Definition: MatrixLookupWeighted.h:63
InputRanker(const MatrixLookup &, const Target &, const statistics::Score &)
Interface Class for score classes.
Definition: Score.h:42
const std::vector< size_t > & id(void) const
const std::vector< size_t > & rank(void) const
Class for ranking rows in a matrix, using a Score and a target vector.
Definition: InputRanker.h:45

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5