Spaces:
Running
Running
how to perform multi label evaluation?
#2
by
fcakyon
- opened
Assume I have more than 1 true label per image or video. How to calculate multi-label F1 using this module?
Hi @fcakyon , the following should work:
f1 = evaluate.load("f1", "multilabel")
f1.compute(
predictions=[[0, 1, 1], [1, 1, 0]],
references=[[0, 1, 1], [0, 1, 0]],
average="macro"
)
Thank a lot @lvwerra !
Opened a PR to improving example usage: https://huggingface.co/spaces/evaluate-metric/f1/discussions/3