ROC Curve and AUC value on SVM model

Hello Everyone,
I am new to ML. I have a question so I am evaluating my SVM model.
Example:

SVM_MODEL = svm.SVC()
SVM_MODEL.fit(X_train,y_train)
SVM_OUTPUT = SVM_MODEL.predict(X_test)

And I want to plot my roc curve and AUC value for it is this the correct code?

fpr1, tpr1, thresholds = metrics.roc_curve(y_valid, SVM_OUTPUT, pos_label=0)
plt.ylabel(“True Positive Rate”)
plt.xlabel(“False Positive Rate”)
plt.title(“ROC Curve”)
plt.plot(tpr1,fpr1)
plt.show()
auc = np.trapz(fpr1,tpr1)
print(‘Area Under ROC Curve:’, auc)

Correct.

© Copyright 2013-2020 Analytics Vidhya