필터 지우기
필터 지우기

perfcurve and ROC curve

조회 수: 6 (최근 30일)
karlo gonzales
karlo gonzales 2016년 2월 23일
댓글: Ilya 2016년 2월 24일
Dear friends,
I have a confusion about ROC curve and hopefully you can help me!
To plot ROC, i was naively using a simple command as plot(False_alarm_rate,Hit_rate,'-'). But, it is not exactly the same as perfcurve plot. To use this function, i wrote the following script
Q=reshape([Hit_rate False_alarm_rate],[],1);
Labels=[]; Labels = ones(size(Q,1),1);
Labels(end/2+1:end) = 0;
PosClass = 1;
X=[];Y=[];
[X Y T,AUC] = perfcurve(Labels,Q,PosClass);
figure, plot(X,Y,'r') % ROC
could you please tell me , what i am missing here?
- BTW, can we calculate d-prime from output of perfcurve?
thanks in advance, Karlo

답변 (1개)

Ilya
Ilya 2016년 2월 23일
Q must be classification scores. What you put in Q sounds more like what perfcurve should return as output. Take a classifier from the Statistics and Machine Learning Toolbox such as decision tree, discriminant etc and look at the predict method. The second output from the predict method is classification score.
  댓글 수: 2
karlo gonzales
karlo gonzales 2016년 2월 23일
Thanks Ilya for your reply.
Indeed, Q represent the Hit rate and the False alarm rate for different subjects who performed a memory test. would you please tell me how you would plot ROC for this case?
Ilya
Ilya 2016년 2월 24일
The standard ROC curve is a plot of TPR vs FPR. The doc for perfcurve defines TPR and FPR (as well as other criteria) in the name-value pair section. You could write down definitions of false alarm rate etc and see if you can transform those into TPR and FPR. I am sure you are at least as good as I am at algebra, and, unlike you, I do not know what hit rate and false alarm rate are.

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

카테고리

Help CenterFile Exchange에서 Detection에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by