- Timestamp:
- Feb 25, 2008, 2:22:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/statistics/ROC.h
r1000 r1141 27 27 */ 28 28 29 #include "yat/classifier/Target.h" 30 #include "yat/utility/iterator_traits.h" 31 29 32 #include <algorithm> 30 33 #include <map> … … 33 36 namespace theplu { 34 37 namespace yat { 35 namespace classifier {36 class DataLookup1D;37 class DataLookupWeighted1D;38 class Target;39 }40 namespace utility {41 class vector;42 }43 38 namespace statistics { 44 39 … … 155 150 }; 156 151 152 /** 153 Add a range [first, last) of values to ROC. The first last-first 154 elements in Target.binary are used. 155 */ 156 template<typename ForwardIterator> 157 void add(ROC& roc, 158 ForwardIterator first, ForwardIterator last, 159 const classifier::Target& target) 160 { 161 for (size_t i=0; first!=last; ++i, ++first) 162 roc.add(utility::iterator_traits<ForwardIterator>().data(), 163 target.binary(i), 164 utility::iterator_traits<ForwardIterator>().weight()); 165 } 157 166 }}} // of namespace statistics, yat, and theplu 158 167
Note: See TracChangeset
for help on using the changeset viewer.