Ignore:
Timestamp:
Mar 1, 2006, 3:03:27 PM (16 years ago)
Author:
Markus Ringnér
Message:

Added score for signal-to-noise ratio (Golub score). Fixed documentation. Improved weighted version of tScore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/statistics/tScore.cc

    r526 r529  
    5050    statistics::AveragerWeighted positive;
    5151    statistics::AveragerWeighted negative;
    52     dof_=target.size()-2;
    5352    for(size_t i=0; i<target.size(); i++){
    5453      if (target.binary(i))
     
    6059    double s2=(positive.sum_xx_centered()+negative.sum_xx_centered())/
    6160      (positive.n()+negative.n()-2);
    62     t_=diff/sqrt(s2*(1.0/positive.sum_w()+1.0/negative.sum_w()));
     61    t_=diff/sqrt(s2*(1.0/positive.sum_w()+1.0/negative.sum_w()));   
    6362    if (t_<0 && absolute_)
    6463      t_=-t_;
     64
     65    if(positive.n()==0 || negative.n()==0 ||
     66       positive.sum_w()==0 || positive.sum_w()==0)
     67      t_=0;
     68    dof_=target.size()-2;
    6569     
    6670    return t_;
Note: See TracChangeset for help on using the changeset viewer.