figure - in[ ]from sklearn metrics import roc_curve fpr_rftpr_rfthresholds_rf roc_curve(y_testrf predict_proba(x_test)[: ]plt plot(fprtprlabel="roc curve svc"plt plot(fpr_rftpr_rflabel="roc curve rf"plt xlabel("fpr"plt ylabel("tpr (recall)"plt plot(fpr[close_zero]tpr[close_zero]' 'markersize= label="threshold zero svc"fillstyle="none" =' 'mew= close_default_rf np argmin(np abs(thresholds_rf )plt plot(fpr_rf[close_default_rf]tpr[close_default_rf]'^'markersize= label="threshold rf"fillstyle="none" =' 'mew= plt legend(loc= figure - comparing roc curves for svm and random forest as for the precision-recall curvewe often want to summarize the roc curve using single numberthe area under the curve (this is commonly just referred to as the aucand it is understood that the curve in question is the roc curvewe can compute the area under the roc curve using the roc_auc_score function model evaluation and improvement