diff --git a/src/twomartens/masterthesis/evaluate.py b/src/twomartens/masterthesis/evaluate.py index 2090f27..150c3b9 100644 --- a/src/twomartens/masterthesis/evaluate.py +++ b/src/twomartens/masterthesis/evaluate.py @@ -142,6 +142,10 @@ def match_predictions(predictions: Sequence[Sequence[Tuple[int, float, int, int, if len(predictions_class) == 0: true_positives.append(true_pos) false_positives.append(false_pos) + cumulative_true_pos = np.cumsum(true_pos) # Cumulative sums of the true positives + cumulative_false_pos = np.cumsum(false_pos) # Cumulative sums of the false positives + cumulative_true_positives.append(cumulative_true_pos) + cumulative_false_positives.append(cumulative_false_pos) continue # Convert the predictions list for this class into a structured array so that we can sort it by confidence. @@ -253,8 +257,6 @@ def get_precision_recall(number_gt_per_class: np.ndarray, """ cumulative_precisions = [[]] cumulative_recalls = [[]] - print(len(cumulative_true_positives)) - print(cumulative_true_positives) # Iterate over all classes. for class_id in range(1, nr_classes + 1):