Changeset 150


Ignore:
Timestamp:
Sep 9, 2004, 6:14:21 PM (17 years ago)
Author:
Peter
Message:

fixed major bug

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ConsensusInputRanker.cc

    r133 r150  
    3535      std::vector<size_t> ranks(nof_rankers_);
    3636      for (size_t j=0; j<nof_rankers_; j++)
    37         ranks[j]=input_rankers_[j].rank(i+1);
     37        ranks[j]=input_rankers_[j].rank(i);
    3838      median[i].first = i;
    3939      median[i].second = stat.median(ranks);
  • trunk/src/ConsensusInputRanker.h

    r133 r150  
    2828  public:
    2929    ///
    30     /// Constructor taking \a data, \a target, Score object
     30    /// Constructor taking \a data, \a target, Score object. The
     31    /// constructor creates ranklists in a \a k fold crossvalidation
     32    /// manner, and in total there is \a n times \a k ranklists.
    3133    ///
    3234    ConsensusInputRanker(const gslapi::matrix& data,
    3335                         const gslapi::vector& target,
    3436                         Score&,
    35                          const size_t = 1,
    36                          const size_t = 3);
     37                         const size_t n = 1 ,
     38                         const size_t k = 3 );
    3739
    3840    ///
    39     /// @return id of input ranked as number \a i
     41    /// Highest ranked row is ranked as number zero @return index of
     42    /// row ranked as number \a i
    4043    ///
    4144    inline size_t id(const size_t i) const {return id_[i];}
    4245   
    4346    ///
    44     /// @return rank for id \a i
     47    /// Highest ranked row is ranked as number zero @return rank for
     48    /// row \a i
    4549    ///
    4650    inline size_t rank(const size_t i) const {return rank_[i];}
  • trunk/src/InputRanker.cc

    r134 r150  
    5252   
    5353    for (size_t i=0; i<nof_genes; i++){
    54       id_[i]=score[i].first;
     54      id_[i]=score[nof_genes-i-1].first;
    5555      rank_[id_[i]]=i;           
    5656    }
     
    8787   
    8888    for (size_t i=0; i<nof_genes; i++){
    89       id_[i]=score[i].first;
     89      id_[i]=score[nof_genes-i-1].first;
    9090      rank_[id_[i]]=i;           
    9191    }
  • trunk/src/InputRanker.h

    r134 r150  
    5151
    5252    ///
    53     /// @return id of input ranked as number i
     53    /// highest ranked gene is ranked as number zero @return id
     54    /// (index) of input ranked as number \a i
    5455    ///
    5556    inline size_t id(const size_t i) const {return id_[i];}
    5657   
    5758    ///
    58     /// @return rank for id i
     59    /// highest ranked gene is ranked as number zero @return rank for
     60    /// id (column) \a i
    5961    ///
    6062    inline size_t rank(const size_t i) const {return rank_[i];}
Note: See TracChangeset for help on using the changeset viewer.