Changeset 2549
- Timestamp:
- Aug 12, 2011, 3:03:52 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/roc.cc
r2370 r2549 3 3 /* 4 4 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 5 Copyright (C) 2011 Peter Johansson 5 6 6 7 This file is part of the yat library, http://dev.thep.lu.se/yat … … 34 35 35 36 using namespace theplu::yat; 37 38 void test_ties(test::Suite& suite); 36 39 37 40 int main(int argc, char* argv[]) … … 92 95 classifier::DataLookupWeighted1D dlw(target.size(),1.3); 93 96 add(roc, dlw.begin(), dlw.end(), target); 94 97 test_ties(suite); 98 95 99 return suite.return_value(); 96 100 } 101 102 void test_ties(test::Suite& suite) 103 { 104 suite.out() << "test ties\n"; 105 statistics::ROC roc; 106 for (size_t i=0; i<20; ++i) 107 roc.add(10.0, i<10); 108 if (!suite.xadd(suite.equal(roc.area(), 0.5))) { 109 suite.err() << "error: roc with ties: area: " << roc.area() << "\n"; 110 } 111 }
Note: See TracChangeset
for help on using the changeset viewer.