Merge nucleic/sleek-ember-seal-uady into dev
This commit is contained in:
@@ -274,6 +274,20 @@ def multitask_metrics(
|
||||
targets.secondary[targets.secondary_mask].tolist(),
|
||||
secondary_predictions[targets.secondary_mask].tolist(),
|
||||
)
|
||||
supported_labels = [
|
||||
label
|
||||
for label, row in zip(
|
||||
secondary["confusionMatrix"]["labels"],
|
||||
secondary["confusionMatrix"]["rows"],
|
||||
)
|
||||
if sum(row)
|
||||
]
|
||||
secondary["supportedLabels"] = supported_labels
|
||||
secondary["supportedMacroRecall"] = float(
|
||||
np.mean(
|
||||
[secondary["perPurposeRecall"][label] for label in supported_labels]
|
||||
)
|
||||
)
|
||||
else:
|
||||
secondary = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user