I implemented, in Matlab, a Bayes Detector, my code return me 2 vectors (100
x1):
TargetDecision: Bayes Detector Decision (my code) (1 for target presence, 0
for target absence)
TargetTrue: real target presence in my observation .
Because I want to plot a ROC curve, I put it in for cycle in this way :
%%%%%%%%
for 1=1:NumberExtraction
[TargetDecision TargetTrue]=BayesDetector(,...,....,)
TruePositive = length(find( TargetDecision==1)&(TargetTrue==1))
FalseNegative=length(find( TargetDecision==0)&(TargetTrue==1))
FalsePositive=length(find( TargetDecision==1)&(TargetTrue==0))
TrueNegative=length(find( TargetDecision==0)&(TargetTrue==0))
TruePositiveRate(i,1)=TruePositive / [TruePositive + FalseNegative]
FalsePositiveRate(i,1)=FalsePositive / [FalsePositive + TrueNegative]
end
plot(FalsePositiveRate, TruePositiveRate)
but it dosen't work. I don't have a correct RoC curve. Why? Is there a
conceptual mistake?
Thanks a lot for your help
Salvatore