How to calculate AUC of ROC curve from these data ?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone I have my raw data that I attach in this question.These data are output from a neural network classification and I am able to plot ROC curve from them. by the code below;
figure(1)
plotroc(targets_train,outputs_train)
title({'ROC Curve of Train Set for Neural network classification'})
xlabel('False positive rate') % x-axis label
ylabel('True positive rate') % y-axis label
figure(2)
plotroc(targets_testset,outputs_test)
title({'ROC Curve of Test Set for Neural network classification'})
xlabel('False positive rate') % x-axis label
ylabel('True positive rate') % y-axis label
However, I don't have any idea, how to calculate AUC of ROC curve from these data ?.
Anyone help me,please ?
Thanks in advance
Pradya
1 Kommentar
Victor Daniel Reyes Dreke
am 18 Mai 2020
Try to use the function [tpr,fpr]=roc(targets,outputs). This function outcomes are the true positive rate and false positive rate used to build the ROC Curve. Finally, trapz(fpr,tpr) will give you the area under the ROC curve
Antworten (1)
Sharmili S
am 27 Jan. 2023
figure(1)
plotroc(targets_train,outputs_train)
title({'ROC Curve of Train Set for Neural network classification'})
xlabel('False positive rate') % x-axis label
ylabel('True positive rate') % y-axis label
figure(2)
plotroc(targets_testset,outputs_test)
title({'ROC Curve of Test Set for Neural network classification'})
xlabel('False positive rate') % x-axis label
ylabel('True positive rate') % y-axis label
0 Kommentare
Siehe auch
Kategorien
Mehr zu ROC - AUC finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!