Changeset 666


Ignore:
Timestamp:
Oct 6, 2006, 6:07:54 AM (15 years ago)
Author:
Peter
Message:

refs #151, added IRRetreive functors and prepared ConsensusInputRanker? for usage.

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/c++_tools/classifier/ConsensusInputRanker.cc

    r616 r666  
    2121namespace classifier { 
    2222
     23  ConsensusInputRanker::ConsensusInputRanker(const IRRetrieve& retriever)
     24    : retriever_(retriever)
     25  {
     26  }
     27
     28
    2329  ConsensusInputRanker::ConsensusInputRanker(const Sampler& sampler,
    2430                                             const MatrixLookup& data,
    25                                              statistics::Score& score)
     31                                             statistics::Score& score,
     32                                             const IRRetrieve& retriever)
     33    : retriever_(retriever)
    2634  {
    2735    assert(sampler.size());
     
    3846  ConsensusInputRanker::ConsensusInputRanker(const Sampler& sampler,
    3947                                             const MatrixLookupWeighted& data,
    40                                              statistics::Score& score)
     48                                             statistics::Score& score,
     49                                             const IRRetrieve& retriever)
     50    : retriever_(retriever)
    4151  {
    4252    assert(sampler.size());
  • trunk/c++_tools/classifier/ConsensusInputRanker.h

    r615 r666  
    55
    66#include <c++_tools/classifier/InputRanker.h>
     7#include <c++_tools/classifier/IRRetrieve.h>
    78
    89namespace theplu {
     
    4849    /// Truly does nothing but creates a few empty member vectors.
    4950    ///
    50     //ConsensusInputRanker(void);
     51    ConsensusInputRanker(const IRRetrieve&);
    5152   
    5253    ///
     
    5758    ///
    5859    ConsensusInputRanker(const Sampler& sampler, const MatrixLookup&,
    59                          statistics::Score& s);
     60                         statistics::Score& s, const IRRetrieve&);
    6061   
    6162    ///
     
    6768    ConsensusInputRanker(const Sampler& sampler,
    6869                         const MatrixLookupWeighted& data,
    69                          statistics::Score& score);
     70                         statistics::Score& score, const IRRetrieve&);
    7071   
    7172    ///
     
    102103    std::vector<InputRanker> input_rankers_;
    103104    std::vector<size_t> rank_;
     105    const IRRetrieve& retriever_;
    104106
    105107  };
  • trunk/c++_tools/classifier/Makefile.am

    r662 r666  
    3737  IGP.cc \
    3838  InputRanker.cc \
     39  IRFunctor.h \
     40  IRRank.h \
     41  IRScore.h \
    3942  Kernel.cc \
    4043  Kernel_MEV.cc \
  • trunk/test/consensus_inputranker_test.cc

    r616 r666  
    88#include <c++_tools/classifier/MatrixLookup.h>
    99#include <c++_tools/classifier/CrossValidationSampler.h>
     10#include <c++_tools/classifier/IRRank.h>
    1011
    1112#include <cstdlib>
     
    4344  theplu::classifier::CrossValidationSampler sampler(target,30,3);
    4445  *error << "Building Consensus_Inputranker" << std::endl;
    45   theplu::classifier::ConsensusInputRanker cir(sampler,data,roc);
     46  theplu::classifier::IRRank retrieve;
     47  theplu::classifier::ConsensusInputRanker cir(sampler,data,roc,retrieve);
    4648  *error << "Done" << std::endl;
    4749
     
    5860  theplu::utility::matrix flag(data.rows(),data.columns(),1);
    5961  // Peter, fix weighted version instead
    60   theplu::classifier::ConsensusInputRanker cir2(sampler,data,roc);
     62  theplu::classifier::ConsensusInputRanker cir2(sampler,data,roc,retrieve);
    6163
    6264  if (cir2.id(0)!=2 || cir2.id(1)!=0 || cir2.id(2)!=1){
Note: See TracChangeset for help on using the changeset viewer.