Fixed dtype of micro and macro precision/recall numpy arrays

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-07-18 15:02:26 +02:00
parent 8897a65b3d
commit 1d21da8ca1

View File

@ -295,8 +295,8 @@ def get_precision_recall(number_gt_per_class: np.ndarray,
""" """
cumulative_precisions = [[]] cumulative_precisions = [[]]
cumulative_recalls = [[]] cumulative_recalls = [[]]
cumulative_precision_micro = np.zeros_like(cumulative_true_positives_micro) cumulative_precision_micro = np.zeros(cumulative_true_positives_micro.shape, dtype=np.float)
cumulative_recall_micro = np.zeros_like(cumulative_true_positives_micro) cumulative_recall_micro = np.zeros(cumulative_true_positives_micro.shape, dtype=np.float)
cumulative_precision_macro = np.zeros_like(cumulative_precision_micro) cumulative_precision_macro = np.zeros_like(cumulative_precision_micro)
cumulative_recall_macro = np.zeros_like(cumulative_recall_micro) cumulative_recall_macro = np.zeros_like(cumulative_recall_micro)
total_number_gt = 0 total_number_gt = 0