Changeset 2548 for branches/0.7-stable/yat/statistics/ROC.cc
- Timestamp:
- Aug 7, 2011, 6:36:44 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.7-stable/yat/statistics/ROC.cc
r2119 r2548 4 4 Copyright (C) 2004, 2005 Peter Johansson 5 5 Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson 6 Copyright (C) 2011 Peter Johansson 6 7 7 8 This file is part of the yat library, http://dev.thep.lu.se/yat … … 30 31 #include <gsl/gsl_cdf.h> 31 32 33 #include <cassert> 32 34 #include <cmath> 35 #include <limits> 33 36 #include <utility> 34 37 #include <vector> … … 94 97 if (block > nof_neg*nof_pos) 95 98 return 0.0; 99 assert(nof_pos>0); 100 assert(nof_neg>0); 96 101 double p1 = get_p_exact(block-nof_neg, nof_pos-1, nof_neg); 97 102 double p2 = get_p_exact(block, nof_pos, nof_neg-1); … … 143 148 area = auc.score(multimap_); 144 149 } 150 if (std::isnan(area)) 151 return std::numeric_limits<double>::quiet_NaN(); 145 152 if (n_pos() < minimum_size_ && n_neg() < minimum_size_) { 146 153 // for small areas we calculate probabilitu to get larger area -
Note: See TracChangeset
for help on using the changeset viewer.