Commit 3128c18b authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

example on IQM done

parent fc9a3ac2
Pipeline #25251 failed with stage
in 4 seconds
This diff is collapsed.
......@@ -73,3 +73,32 @@ def plot_det(scores_dev, scores_eval, ax_lim=[0.01, 90, 0.01, 90]):
pyplot.grid(True)
pyplot.show()
def compare_dets(scores_neg, scores_pos, labels, ax_lim=[0.01, 90, 0.01, 90]):
"""
Parameters
----------
scores_eval: list
The list of scores
labels: list
The labels
"""
colors = ['C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7' ]
assert len(scores_neg) == len(labels)
assert len(scores_pos) == len(labels)
assert len(scores_neg) <= len(colors)
n_points = 100
pyplot.figure(figsize=(7,5))
pyplot.title('DET curves', fontsize=16, pad=10)
for i in range(len(scores_neg)):
bob.measure.plot.det(scores_neg[i], scores_pos[i], n_points, color=colors[i], linestyle='-', label=labels[i])
bob.measure.plot.det_axis(ax_lim)
pyplot.xlabel('APCER (%)')
pyplot.ylabel('BPCER (%)')
pyplot.legend()
pyplot.grid(True)
pyplot.show()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment