ROC curve AlexNet CNN

17 views (last 30 days)
Gledson Melotti
Gledson Melotti on 20 Dec 2017
Answered: Hiren Mewada on 25 Jan 2024
How to calculate the ROC curve using AlexNet CNN from Matlab? I have two class.

Answers (3)

Gledson Melotti
Gledson Melotti on 4 Oct 2018
cgt = double(testeImagesLabels); clabel = double(Test_predict); cscores = double(Probability);
figure(2) [X,Y,T,AUC,OPTROCPT,SUBY,SUBYNAMES] = perfcurve(cgt,cscores(:,1),1); plot(X,Y,'k');
  8 Comments
Jhalak Mehta
Jhalak Mehta on 12 Apr 2022
Edited: Jhalak Mehta on 12 Apr 2022
How do I get the probability?
Hiren Mewada
Hiren Mewada on 25 Jan 2024
classNames = net.Layers(end).Classes;
rocSmallNet = rocmetrics(imdsTest.Labels,score,classNames);
p = plot(rocSmallNet,ShowModelOperatingPoint=false)

Sign in to comment.


Salma Hassan
Salma Hassan on 20 Feb 2018
sir did you find the solution i have the same problem
  8 Comments
Gledson Melotti
Gledson Melotti on 4 Oct 2018
cgt = double(testeImagesLabels); clabel = double(Test_predict); cscores = double(Probability);
figure(2) [X,Y,T,AUC,OPTROCPT,SUBY,SUBYNAMES] = perfcurve(cgt,cscores(:,1),1); plot(X,Y,'k');
mustafa kanaan
mustafa kanaan on 14 Jan 2022
Please can you help me in the section, becuase I have error thanks

Sign in to comment.


Hiren Mewada
Hiren Mewada on 25 Jan 2024
[predictions,score] = classify(net, imdsTest); % To get prediction score from last layer for each class
classNames = net.Layers(end).Classes;
rocSmallNet = rocmetrics(imdsTest.Labels,score,classNames);
p = plot(rocSmallNet,ShowModelOperatingPoint=false)

Community Treasure Hunt

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

Start Hunting!