| 24 | #include "counter.hpp" |
| 25 | |
| 26 | double Counter::get_precision(void) |
| 27 | { |
| 28 | cerr<<"tp: "<<tp<<" fp: "<<fp<<" fn: "<<fn<<endl; |
| 29 | if(tp+fp == 0) |
| 30 | { |
| 31 | cerr<<"no positive detection"<<endl; |
| 32 | return -1; |
| 33 | } |
| 34 | return tp/double(tp + fp); |
| 35 | } |
| 36 | |
| 37 | double Counter::get_recall(void) |
| 38 | { |