In multi-label problems (tagging a support ticket as both "billing" and "urgent"), each sample has a set of labels. Implement metrics for binary indicator matrices Y_true and Y_pred of shape (samples, labels):
hamming_loss: the fraction of individual label slots that are wrongsubset_accuracy: the fraction of samples where the whole row is exactly rightmicro_f1: F1 over all TP/FP/FN summed across labelsmacro_f1: the mean of per-label F1 (a label with no TP, FP or FN counts as F1 = 1.0)jaccard_samples: the mean over samples of |true ∩ pred| / |true ∪ pred|, where two empty sets score 1.0