yat  0.14.5pre
ConsensusInputRanker.h
1 #ifndef _theplu_yat_classifier_consensusinputranker_
2 #define _theplu_yat_classifier_consensusinputranker_
3 
4 // $Id: ConsensusInputRanker.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 2004, 2005 Peter Johansson
8  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
9  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
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 "InputRanker.h"
28 
29 #include <vector>
30 
31 namespace theplu {
32 namespace yat {
33 namespace statistics {
34  class Score;
35  class VectorFunction;
36 }
37 namespace classifier {
38 
39  class IRRetrieve;
40  class MatrixLookup;
41  class MatrixLookupWeighted;
42  class Sampler;
43 
68  {
69 
70  public:
71 
78 
85  void add(const Sampler& sampler, const MatrixLookup&,
86  const statistics::Score& s);
87 
96  void add(const Sampler& sampler, const MatrixLookupWeighted& data,
97  const statistics::Score& score);
98 
107  void add(const InputRanker& ir);
108 
113  size_t id(size_t i) const;
114 
118  const InputRanker& input_ranker(size_t i) const;
119 
124  size_t rank(size_t i) const;
125 
132  void reserve(size_t n);
133 
134 
138  void update(void);
139 
140 
141  private:
142 
143  std::vector<size_t> id_;
144  std::vector<InputRanker> input_rankers_;
145  std::vector<size_t> rank_;
146  const IRRetrieve& retriever_;
147  const statistics::VectorFunction& vec_func_;
148  };
149 
150 }}} // of namespace classifier, yat, and theplu
151 
152 #endif
General view into utility::Matrix.
Definition: MatrixLookup.h:70
ConsensusInputRanker(const IRRetrieve &, const statistics::VectorFunction &)
Default constructor.
General view into utility::MatrixWeighted.
Definition: MatrixLookupWeighted.h:63
Interface Class for score classes.
Definition: Score.h:42
Robust algorithm to rank rows in a data matrix versus a target vector.
Definition: ConsensusInputRanker.h:67
void add(const Sampler &sampler, const MatrixLookup &, const statistics::Score &s)
Interface class for dividing samples into training and validation.
Definition: Sampler.h:39
Class for ranking rows in a matrix, using a Score and a target vector.
Definition: InputRanker.h:45
Interface class for retrieving information from a InputRanker to build a ConsensusInputRanker.
Definition: IRRetrieve.h:35
const InputRanker & input_ranker(size_t i) const
Interface Class for vector functors.
Definition: VectorFunction.h:36
void reserve(size_t n)
reserve memory for internal vector of InputRankers

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