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.

SVM_MODEL = svm.SVC(),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”)
auc = np.trapz(fpr1,tpr1)
print(‘Area Under ROC Curve:’, auc)


© Copyright 2013-2020 Analytics Vidhya