728x90
반응형
def roc_curve_plot(y_test, pred_proba_c1):
fprs, tprs, thresholds = roc_curve(y_test, pred_proba_c1)
plt.plot(fprs, tprs, label='ROC')
plt.plot([0,1], [0,1], 'k--', label='Random')
start, end = plt.xlim()
plt.xticks(np.round(np.arange(start, end, 0.1), 2))
plt.xlim(0,1);plt.ylim(0,1)
plt.xlabel('FPR( 1 - sensitivity )'); plt.ylabel('TPR( Recall )')
plt.legend()
728x90
반응형