Borrar filtros
Borrar filtros

How to calculate AUC of ROC curve from these data ?

31 visualizaciones (últimos 30 días)
Pradya Panyainkaew
Pradya Panyainkaew el 22 de Abr. de 2018
Respondida: Sharmili S el 27 de En. de 2023
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 comentario
Victor Daniel Reyes Dreke
Victor Daniel Reyes Dreke el 18 de Mayo de 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

Iniciar sesión para comentar.

Respuestas (1)

Sharmili S
Sharmili S el 27 de En. de 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

Categorías

Más información sobre ROC - AUC en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by