-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Matthews Correlation Coefficient (#561)
* Add Matthews Correlation Coefficient (MCC) metric * Reorder arguments in _multilabel_mcc_reference function * update linux version for code check * revert ubuntu version change & update action versions * use torch instead of dlpack to convert tensors to numpy * update numpy conversion methods * set dtype for multilabel test inputs * fix doctest error * update implementation of multilabel confusion matrix * revert implementation update & add print statements for debugging * fix tests * use float64 for internal computations * Refactor test files and remove debug print statement * Fix data type in Matthews correlation coefficient calculation * Update dtype in _mcc_reduce function * Fix NaN handling in confusion matrix computation * use epsilon to check `denom` to avoid precision issues --------- Signed-off-by: Amrit Krishnan <amrit110@gmail.com> Co-authored-by: Amrit Krishnan <amrit110@gmail.com>
- Loading branch information
Showing
17 changed files
with
1,119 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Confusion matrix.""" | ||
|
||
from types import ModuleType | ||
from typing import Any, Optional, Tuple, Union | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.