You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Scikit-Learn 1.2.0 or laterfromsklearn.metricsimportRocCurveDisplay# from_estimator() = use a model to plot ROC curve on dataRocCurveDisplay.from_estimator(estimator=gs_log_reg,
X=X_test,
y=y_test);
The text was updated successfully, but these errors were encountered:
Link to notebook changed: https://github.com/mrdbourke/zero-to-mastery-ml/blob/master/section-3-structured-data-projects/end-to-end-heart-disease-classification.ipynb
Error
As of Scikit-Learn 1.2+ the method
sklearn.metrics.plot_roc_curve
is deprecated in favour ofsklearn.metrics.RocCurveDisplay
.How to check your Scikit-Learn version
You can check your Scikit-Learn version with:
How to update your Scikit-Learn version
You can run the following command in your terminal with your Conda (or other) environment active to upgrade Scikit-Learn (the
-U
stands for "upgrade):Previous code (this will error if running Scikit-Learn version 1.2+)
Also:
New code (this will work with Scikit-Learn version 1.2+)
And to plot a ROC curve, note the use of
RocCurveDisplay.from_estimator()
:The text was updated successfully, but these errors were encountered: