-
- { ////////////////////////////////////////////////////////////////////
- // Sanity check
-
- int nb_positives = 0;
-
- for(int t = 0; t < nb_targets_total; t++) {
- int positive = 1;
- for(int q = 0; q < _nb_classifiers; q++) {
- if(responses[t + nb_targets_total * q] < _thresholds[q]) positive = 0;
- }
- if(positive) nb_positives++;
- }
-
- scalar_t actual_tp = scalar_t(nb_positives) / scalar_t(nb_targets_total);
-
- (*global.log_stream) << "Overall detection rate " << nb_positives << "/" << nb_targets_total
- << " "
- << "actual_tp = " << actual_tp
- << " "
- << "wanted_tp = " << wanted_tp
- << endl;
-
- if(actual_tp < wanted_tp) {
- cerr << "INCONSISTENCY" << endl;
- abort();
- }
- } ////////////////////////////////////////////////////////////////////
-