Commit 78a34d4c authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

finished the speaker part

parent 2e3db8fc
Pipeline #25407 failed with stage
in 3 seconds
......@@ -6,7 +6,7 @@ import bob.measure
from matplotlib import pyplot
import bob.bio.base
def plot_scores_distributions(scores_dev, scores_eval, title='Score Distribution', n_bins=50, threshold_height=1):
def plot_scores_distributions(scores_dev, scores_eval, title='Score Distribution', n_bins=50, threshold_height=1, legend_loc='best'):
"""
Parameters
----------
......@@ -34,14 +34,14 @@ def plot_scores_distributions(scores_dev, scores_eval, title='Score Distribution
ax[0].set_title('Development set')
ax[0].set_xlabel("Score Value")
ax[0].set_ylabel("Probability Density")
ax[0].legend()
ax[0].legend(loc=legend_loc)
ax[1].hist(scores_eval[1], density=True, color='C1', bins=n_bins, label='Bona-fide')
ax[1].hist(scores_eval[0], density=True, color='C7', bins=n_bins, alpha=0.4, hatch='\\\\', label='Presentation Attack')
ax[1].vlines(threshold, 0, threshold_height, colors='r', linestyles='dashed', label='EER Threshold')
ax[1].set_title('Evaluation set')
ax[1].set_xlabel("Score Value")
ax[1].set_ylabel("Probability Density")
ax[1].legend()
ax[1].legend(loc=legend_loc)
pyplot.show()
......
This diff is collapsed.
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