Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/whats_new/v0.22.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ Changelog
:mod:`sklearn.metrics`
......................

- |MajorFeature| :func:`metrics.plot_roc_curve` has been added to plot roc
curves. This function introduces the visualization API described in
the :ref:`User Guide <visualizations>`. :pr:`14357` by `Thomas Fan`_.

- |Feature| Added multiclass support to :func:`metrics.roc_auc_score`.
:issue:`12789` by :user:`Kathy Chen <kathyxchen>`,
:user:`Mohamed Maskani <maskani-moh>`, and :user:`Thomas Fan <thomasjpfan>`.
Expand Down
2 changes: 1 addition & 1 deletion sklearn/metrics/_plot/roc_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def plot_roc_curve(estimator, X, y, pos_label=None, sample_weight=None,

if y_pred.ndim != 1:
if y_pred.shape[1] > 2:
raise ValueError("Estimator should solve a"
raise ValueError("Estimator should solve a "
"binary classification problem")
y_pred = y_pred[:, 1]
fpr, tpr, _ = roc_curve(y, y_pred, pos_label=pos_label,
Expand Down