Ignore:
Timestamp:
Oct 22, 2008, 11:58:26 PM (13 years ago)
Author:
Peter
Message:

adding a signed_score in KS statistics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/KolmogorovSmirnov.cc

    r1594 r1595  
    101101  double KolmogorovSmirnov::score(void) const
    102102  {
     103    return std::abs(signed_score());
     104  }
     105
     106
     107  double KolmogorovSmirnov::signed_score(void) const
     108  {
    103109    if (cached_)
    104110      return score_;
     
    111117    utility::abs<double> a;
    112118    using utility::make_compose_f_gx_hy;
    113     score_ = std::abs(*std::max_element(v.begin(), v.end(),
    114                                         make_compose_f_gx_hy(l, a, a)));
     119    score_ = *std::max_element(v.begin(), v.end(),
     120                               make_compose_f_gx_hy(l, a, a));
     121    cached_=true;
    115122    return score_;
    116123  }
Note: See TracChangeset for help on using the changeset viewer.