To plot the Receiver Operating Characteristic (ROC) curve and compute the Area Under the Curve (AUC) for a Convolutional Neural Network (CNN) model in MATLAB, you typically need the predicted scores (probabilities) from your model and the true labels of your test data.
In MATLAB you can use ‘plotroc’ function to plot the receiver operating characteristic for each output class and to get the area under the ROC curve while you train a deep neural network, you can use ‘aucMetric’ function. For more information regarding these functions, you can refer to the below documentation links-