Scikit-learn

Plot ROC Curve

Evaluate the performance of your classification model with this Python code snippet that plots an ROC (Receiver Operating Characteristic) curve. An ROC curve is a powerful tool for assessing the quality of a classifier, providing insights into its ability to distinguish between classes.

roc-curveclassification

Required packages

You need below packages to use the code generated by recipe. All packages are automatically installed in MLJAR Studio.

mljar-scikit-plot>=0.3.11

Interactive recipe

You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.

In the below recipe, we assume that you have following variables available in your notebook:

  • y (type Series)
  • predicted (type Series)

Python code

# Python code will be here

Code explanation

Plot ROC curve.

« Previous
Confusion Matrix