Scoring¶
-
class
scoring.
DER
(hyp_diarization, ref_diarization, uem_dirization=None, collar=0, no_overlap=False)[source]¶ Class to compute a s4d error rate. Error is computed at a rate of 10ms.
Attr uem_set: a set of index to evaluate Attr collar: is the no-score zone around reference speaker segment boundaries. (Speaker Diarization output is not evaluated within +/- collar seconds of a reference speaker segment boundary.) :attr uem_set_collar: a set of index on with the collar is applied :attr length: the last index in the reference :attr ref_cluster_list: the list of reference cluster_list :attr ref_mat: the numpy.ndarry of reference indexes, each row correspond to a reference cluster (same order as ref_cluster_list) :attr hyp_cluster_list: the list of hypothesis cluster_list :attr hyp_mat: the numpy.ndarry of reference indexes, each row correspond to a hypothesis cluster (same order as ref_cluster_list) :attr conf: the confusion matrix :attr assigned: a numpy.ndarray given the association between the references and hypotheses :attr not_assigned: a list of hypothesis cluster_list not associated to a reference cluster
-
assignment
()[source]¶ Compute the reference to hypothese association using the hungrian algorithm
Returns: a dict object with key equal to (reference cluster, hypothesis cluster) and value equal to the confusion score :return: a list object containing the hypothesis cluster_list that are not assigned
-
confusion
()[source]¶ Compute the confusion matrix between reference and hypothesis
Returns: a numpy.ndarray object of shape (#reference, #hypothesis)
-
-
class
scoring.
DER_result
(show)[source]¶ Class to store the s4d error results
-
accumulate
(result)[source]¶ Accumulate the scores :param result: a DER_result object to accumulate :return:
-
classmethod
header
(speech=True, overlap=False, speaker=True)[source]¶ Make the header :param speech: add speech/non-speech results :param overlap: add overlap result :param speaker: add speaker result (DER) :return: a str
-