We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1161bf0 commit 2b04381Copy full SHA for 2b04381
pymatviz/relevance.py
@@ -5,7 +5,6 @@
5
from typing import TYPE_CHECKING
6
7
import matplotlib.pyplot as plt
8
-import sklearn.metrics as skm
9
10
from pymatviz.utils import df_to_arrays
11
@@ -37,6 +36,8 @@ def roc_curve(
37
36
ax = ax or plt.gca()
38
39
# get the metrics
+ import sklearn.metrics as skm
40
+
41
false_pos_rate, true_pos_rate, _ = skm.roc_curve(targets, proba_pos)
42
roc_auc = skm.roc_auc_score(targets, proba_pos)
43
@@ -71,6 +72,8 @@ def precision_recall_curve(
71
72
73
74
75
76
77
precision, recall, _ = skm.precision_recall_curve(targets, proba_pos)
78
79
# proba_pos.round() converts class probabilities to integer class labels
0 commit comments