python metric.auc的运用
def plot_auc(y_test,y_pred):
fpr, tpr, thread = metrics.roc_curve(np.array(y_test), np.array(y_pred))
x=metrics.auc(fpr, tpr)
plt.title("ROC curve of %s (AUC = %.4f)" % ('lightgbm', x))
plt.xlabel("False Positive Rate")
plt.ylabel("True Positive Rate")
plt.plot(fpr,tpr)
plt.show()