Changeset 560


Ignore:
Timestamp:
Mar 13, 2006, 3:36:54 PM (17 years ago)
Author:
Markus Ringnér
Message:

Minor fixes plus fixed bug in ConsensusInputRanker?

Location:
trunk/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/classifier/ConsensusInputRanker.cc

    r558 r560  
    1616#include <utility>
    1717#include <vector>
    18 
     18#include <cmath>
    1919
    2020namespace theplu {
     
    3232        input_rankers_.push_back(InputRanker(sampler.training_data(),
    3333                                             sampler.training_target(),
    34                                              score_object));
     34                                             score_object,
     35                                             sampler.training_weight()));
    3536      }
    3637      else{
    3738        input_rankers_.push_back(InputRanker(sampler.training_data(),
    3839                                             sampler.training_target(),
    39                                              score_object));
     40                                             score_object));       
    4041      }
    4142      sampler.next();
  • trunk/lib/classifier/CrossSplitter.h

    r558 r560  
    115115    /// @note if state is invalid the result is undefined
    116116    ///
    117     inline const DataLookup2D& training_weight(void) const
     117    inline const MatrixLookup& training_weight(void) const
    118118    { assert(more()); return *(training_weight_[state_]); }
    119119
     
    147147    /// @note if state is invalid the result is undefined
    148148    ///
    149     inline const DataLookup2D& validation_weight(void) const
     149    inline const MatrixLookup& validation_weight(void) const
    150150    { assert(more()); return *(validation_weight_[state_]); }
    151151
  • trunk/lib/classifier/InputRanker.cc

    r536 r560  
    1313#include <vector>
    1414
     15#include <cmath>
    1516
    1617namespace theplu {
     
    5960    for (size_t i=0; i<nof_genes; i++) {
    6061      double area = score_object.score(target, DataLookup1D(data,i,true),
    61                                        DataLookup1D(weight,i,true));
     62                                       DataLookup1D(weight,i,true));     
     63      assert(!std::isnan(area));
    6264      std::pair<double, size_t> tmp(area,i);
    6365      score.push_back(tmp);
  • trunk/lib/classifier/MatrixLookup.h

    r556 r560  
    8585
    8686    ///
    87     /// Constructor taking the column (default) or row index vector as
     87    /// Constructor taking the column or row index vector (default) as
    8888    /// input. If @a row is false the created MatrixLookup will have
    8989    /// equally many rows as @a matrix.
     
    9494    ///
    9595    MatrixLookup(const MatrixLookup& matrix, const std::vector<size_t>&,
    96                  const bool row=false);
     96                 const bool row_vectors=true);
    9797
    9898    ///
  • trunk/lib/statistics/SNR.cc

    r530 r560  
    5353    double diff = positive.mean() - negative.mean();
    5454    double denom=positive.std()+negative.std();
     55    assert(denom);
    5556    score_=diff/denom;
    5657    if(positive.sum_w()==0 || negative.sum_w()==0)
Note: See TracChangeset for help on using the changeset viewer.