def accuracy_macro_f1(golds, preds, probs): f1 = macro_f1(golds, preds, probs) accuracy = metric_score(golds, preds, probs, metric="accuracy") return (f1 + accuracy) / 2
def macro_f1(golds, preds, probs): return metric_score(golds, preds, probs, metric="f1")