We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2c71ed commit 3865b36Copy full SHA for 3865b36
1 file changed
cobra/evaluation/evaluator.py
@@ -11,6 +11,7 @@
11
from sklearn.metrics import roc_curve
12
from sklearn.metrics import confusion_matrix
13
from sklearn.metrics import roc_auc_score
14
+from sklearn.metrics import matthews_corrcoef
15
from sklearn.exceptions import NotFittedError
16
17
@@ -109,6 +110,7 @@ def compute_scalar_metrics(y_true: np.ndarray,
109
110
"precision": precision_score(y_true, y_pred_b),
111
"recall": recall_score(y_true, y_pred_b),
112
"F1": f1_score(y_true, y_pred_b, average=None)[1],
113
+ "matthews_corrcoef": matthews_corrcoef(y_true, y_pred_b),
114
"lift at {}".format(lift_at): np.round(Evaluator
115
._compute_lift(
116
y_true=y_true,
0 commit comments