Spaces:
Runtime error
Runtime error
Commit
•
a27cb6e
1
Parent(s):
7ee8957
Update metric_for_tp_fp_samples.py
Browse files
metric_for_tp_fp_samples.py
CHANGED
@@ -223,9 +223,11 @@ class metric_tp_fp_Datasets(evaluate.Metric):
|
|
223 |
if j[0] in i:
|
224 |
TP_data.loc[TP_data["class"] == j[0], "coincidence count"] += 1
|
225 |
TP_data = TP_data.sort_values(by=["class"], ignore_index = True)
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
229 |
if j[1] == 2:
|
230 |
FP_data.loc[FP_data["class"] == j[0], "number of samples"] += 1
|
231 |
if len(i) >> 0:
|
|
|
223 |
if j[0] in i:
|
224 |
TP_data.loc[TP_data["class"] == j[0], "coincidence count"] += 1
|
225 |
TP_data = TP_data.sort_values(by=["class"], ignore_index = True)
|
226 |
+
else:
|
227 |
+
if FPifWrong:
|
228 |
+
for k in i:
|
229 |
+
FP_data.loc[FP_data["class"] == k, "coincidence count"] += 1
|
230 |
+
FP_data = FP_data.sort_values(by=["class"], ignore_index = True)
|
231 |
if j[1] == 2:
|
232 |
FP_data.loc[FP_data["class"] == j[0], "number of samples"] += 1
|
233 |
if len(i) >> 0:
|