00001 #ifndef _theplu_yat_classifier_consensusinputranker_
00002 #define _theplu_yat_classifier_consensusinputranker_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "InputRanker.h"
00028
00029 #include <vector>
00030
00031 namespace theplu {
00032 namespace yat {
00033 namespace statistics {
00034 class Score;
00035 class VectorFunction;
00036 }
00037 namespace classifier {
00038
00039 class IRRetrieve;
00040 class MatrixLookup;
00041 class MatrixLookupWeighted;
00042 class Sampler;
00043
00067 class ConsensusInputRanker
00068 {
00069
00070 public:
00071
00077 ConsensusInputRanker(const IRRetrieve&, const statistics::VectorFunction&);
00078
00085 void add(const Sampler& sampler, const MatrixLookup&,
00086 const statistics::Score& s);
00087
00096 void add(const Sampler& sampler, const MatrixLookupWeighted& data,
00097 const statistics::Score& score);
00098
00107 void add(const InputRanker& ir);
00108
00113 size_t id(size_t i) const;
00114
00118 const InputRanker& input_ranker(size_t i) const;
00119
00124 size_t rank(size_t i) const;
00125
00132 void reserve(size_t n);
00133
00134
00138 void update(void);
00139
00140
00141 private:
00142
00143 std::vector<size_t> id_;
00144 std::vector<InputRanker> input_rankers_;
00145 std::vector<size_t> rank_;
00146 const IRRetrieve& retriever_;
00147 const statistics::VectorFunction& vec_func_;
00148 };
00149
00150 }}}
00151
00152 #endif