Changeset 3433


Ignore:
Timestamp:
Oct 27, 2015, 6:40:36 AM (6 years ago)
Author:
Peter
Message:

fixes #846

Location:
branches/0.13-stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.13-stable/test/roc.cc

    r3114 r3433  
    230230    suite.err() << "error: expected p-value>0.5\n  found: "
    231231                << roc.p_right() << "\n";
     232  }
     233  if (roc.p_value() > 1.0) {
     234    suite.err() << "error: expected p-value <= 1\n    found: "
     235                << roc.p_value() << "\n";
     236    suite.add(false);
    232237  }
    233238}
  • branches/0.13-stable/yat/statistics/ROC.cc

    r3023 r3433  
    228228      return std::min(p, 1.0);
    229229    }
    230     return 2*get_p_approx(area());
     230    return 2*get_p_approx(std::max(area(), 1-area()));
    231231  }
    232232
Note: See TracChangeset for help on using the changeset viewer.