필터 지우기
필터 지우기

How to calculate AUC of ROC curve from these data ?

조회 수: 21 (최근 30일)
Pradya Panyainkaew
Pradya Panyainkaew 2018년 4월 22일
답변: Sharmili S 2023년 1월 27일
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
Victor Daniel Reyes Dreke
Victor Daniel Reyes Dreke 2020년 5월 18일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Sharmili S
Sharmili S 2023년 1월 27일
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

카테고리

Help CenterFile Exchange에서 ROC - AUC에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by