ROC curve

PHOTO EMBED

Wed May 25 2022 14:21:19 GMT+0000 (Coordinated Universal Time)

Saved by @biggusdickus #python

def plot_roc_curve(fpr, tpr, label=None):
    plt.plot(fpr, tpr, linewidth=2, label=label)
    plt.plot([0, 1], [0, 1], 'k--')
    plt.axis([0, 1, 0, 1])                                  
    plt.xlabel('False Positive Rate (Fall-Out)', fontsize=16)
    plt.ylabel('True Positive Rate (Recall)', fontsize=16)   
    plt.grid(True)                                           
plt.figure(figsize=(8, 6))                                   
plot_roc_curve(fpr, tpr)
plt.show()
content_copyCOPY