Problem 1: Calculate and Plot a Basic ROC Curve
Easypython
Learn the Concept: ROC-AUC CurveProblem Description
Write a Python program that trains a Logistic Regression model, calculates the ROC curve, and plots it alongside the random-guessing diagonal line.
Input
A labeled dataset suitable for binary classification.
Output
A displayed ROC curve plot with AUC labeled.
Constraints
- At least 8 labeled examples.
Example Input
textX=[[1],[2],[3],[4],[5],[6],[7],[8]], y=[0,0,0,0,1,1,1,1]
Example Output
text(A plotted ROC curve with the AUC score shown in the legend)
Concepts Covered
roc_curve(), roc_auc_score(), plt.plot().
Related Problems
- Problem 2: Calculate AUC for Two Different ModelsEasy · pythonSolve Problem
- Problem 3: Calculate TPR and FPR at a Specific ThresholdEasy · pythonSolve Problem
- Problem 4: Compare AUC Across Different Feature SetsEasy · pythonSolve Problem