Changeset 530


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

Fixed problems for empty target groups

File:
1 edited

Legend:

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

    r529 r530  
    3131    double denom=positive.std()+negative.std();
    3232    score_=diff/denom;
     33    if(positive.n()==0 || negative.n()==0)
     34      score_=0;
    3335    if (score_<0 && absolute_)
    3436      score_=-score_;   
     
    5254    double denom=positive.std()+negative.std();
    5355    score_=diff/denom;
     56    if(positive.sum_w()==0 || negative.sum_w()==0)
     57      score_=0;
    5458    if (score_<0 && absolute_)
    5559      score_=-score_;   
Note: See TracChangeset for help on using the changeset viewer.