使用bob python包绘制DET曲线中的EER点

使用bob python包绘制DET曲线中的EER点,python,matplotlib,plot,python-bob,Python,Matplotlib,Plot,Python Bob,示例代码: >>> from matplotlib import pyplot >>> import bob.measure >>> positives = np.random.normal(1,1,100) >>> negatives = np.random.normal(-1,1,100) >>> # we assume you have your negatives and positives alr

示例代码:

>>> from matplotlib import pyplot
>>> import bob.measure
>>> positives = np.random.normal(1,1,100)
>>> negatives = np.random.normal(-1,1,100)
>>> # we assume you have your negatives and positives already split
>>> npoints = 100
>>> bob.measure.plot.det(negatives, positives, npoints, color=(0,0,0), linestyle='-', label='test') 
>>> bob.measure.plot.det_axis([0.01, 40, 0.01, 40]) 
>>> pyplot.xlabel('FAR (%)') 
>>> pyplot.ylabel('FRR (%)') 
>>> pyplot.grid(True)
>>> pyplot.show() 
此代码返回以下图像:

以下函数计算EER:

eer1 = bob.measure.eer_rocch(negatives, positives)
我想把这个交点包括在曲线中。 我试过:

>>> from matplotlib import pyplot
>>> import bob.measure
>>> positives = np.random.normal(1,1,100)
>>> negatives = np.random.normal(-1,1,100)
>>> # we assume you have your negatives and positives already split
>>> npoints = 100
>>> bob.measure.plot.det(negatives, positives, npoints, color=(0,0,0), linestyle='-', label='test') 
>>> bob.measure.plot.det_axis([0.01, 40, 0.01, 40]) 
>>> pyplot.plot(eer1,eer1) 
>>> pyplot.xlabel('FAR (%)') 
>>> pyplot.ylabel('FRR (%)') 
>>> pyplot.grid(True)
>>> pyplot.show() 
没有成功。 我想得到一个如下例所示的数字:

这已在中修复,并包含在新版本的bob.measure中。要确保点落在绘图上,请显著增加点的数量

从matplotlib导入pyplot
导入bob.measure
将numpy作为np导入
npoints=1000#此处使用大数
正=np.随机.正常(1,1100)
负数=np.随机正常(-1,1100)
bob.measure.plot.det(负片、正片、非点、颜色=(0,0,0)、线型='-'、标签='test')
bob.measure.plot.det_轴([0.01,40,0.01,40])
eer1=bob.measure.eer(否定、肯定)
#DET图为对数比例,使用ppndf转换点
eer2=bob.measure.ppndf(eer1)
plot(eer2,eer2,“o”,label=f“EER={eer1*100}%”)
pyplot.xlabel('FAR(%)'))
pyplot.ylabel('FRR(%)'))
pyplot.grid(True)
pyplot.legend()
pyplot.show()