luferrer / DCA-PLDA

Discriminative Condition-Aware PLDA
Other
41 stars 7 forks source link

Bug in ROCCH.Bayes_error_rate #1

Open bsxfan opened 3 years ago

bsxfan commented 3 years ago

Try this:

scores = np.array([1.0,2.0,3.0])
labels = np.array([0,0,1])
rocch = ROCCH(PAV(scores,labels))
ber, pmiss, pfa = rocch.Bayes_error_rate(-np.inf,True)

This gives ber, pmiss, pfa = (0,0,0), but pfa should be 1. The ROCCH is correctly computed and so is ber. But sometimes pmiss or pfa is not. The problem is here. The relevant vertex of the ROCCH is found by minimization. But sometimes, the minimum is not unique. The value of the minimum is the Bayes error-rate ber, which is then correct. But the wrong index sometimes happens to be chosen, returning the wrong pmiss or pfa.

I will figure out how to fix this.

Niko