Skip to content

Commit

Permalink
Update confusion_matrix.py
Browse files Browse the repository at this point in the history
adding config_name="multilabel" to load
  • Loading branch information
0ssamaak0 authored Jan 9, 2024
1 parent 94f53a2 commit 7f93428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/confusion_matrix/confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Example 2-Multilabel scenario
>>> you must pass (config_name="multilabel") to the load method
>>> confusion_matrix_metric = evaluate.load("confusion_matrix")
>>> confusion_matrix_metric = evaluate.load("confusion_matrix", config_name="multilabel")
>>> results = confusion_matrix_metric.compute(references=[[0, 1], [1, 0], [0, 0], [0, 1], [1, 0], [0, 0]], predictions=[[0, 1], [1, 0], [1, 0], [0, 0], [1, 0], [0, 1]])
>>> print(results) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
{'confusion_matrix': [[[3, 1], [0, 2]], [[3, 1], [1, 1]]]}
Expand Down

0 comments on commit 7f93428

Please sign in to comment.