def results_overall_metrics(self):
        """Overall metrics

        Returns
        -------
        dict
            results in a dictionary format

        """

        # F-measure
        if self.overall['Nref'] > 0:
            precision = metric.precision(
                Ntp=self.overall['Ntp'],
                Nsys=self.overall['Nsys']
            )

            recall = metric.recall(
                Ntp=self.overall['Ntp'],
                Nref=self.overall['Nref']
            )

            f_measure = metric.f_measure(
                precision=precision,
                recall=recall
            )

        else:
            precision = None
            recall = None
            f_measure = None

        y_true = []
        y_score = []
        for tag_id, tag_label in enumerate(self.tag_label_list):
            y_true += self.y_true[tag_label]
            y_score += self.y_pred_score[tag_label]

        if y_score:
            eer = metric.equal_error_rate(
                y_true=y_true,
                y_score=y_score
            )

        else:
            eer = None

        return {
                'count': {
                    'Nref': self.overall['Nref'],
                    'Nsys': self.overall['Nsys'],
                },
                'f_measure': {
                    'f_measure': f_measure,
                    'precision': precision,
                    'recall': recall,
                },
                'eer': {
                    'eer': eer
                }

        }
def results_overall_metrics ( self ) : if self . overall [ 'Nref' ] > 0 : precision = metric . precision ( Ntp = self . overall [ 'Ntp' ] , Nsys = self . overall [ 'Nsys' ] ) recall = metric . recall ( Ntp = self . overall [ 'Ntp' ] , Nref = self . overall [ 'Nref' ] ) f_measure = metric . f_measure ( precision = precision , recall = recall ) else : precision = None recall = None f_measure = None y_true = [ ] y_score = [ ] for tag_id , tag_label in enumerate ( self . tag_label_list ) : y_true += self . y_true [ tag_label ] y_score += self . y_pred_score [ tag_label ] if y_score : eer = metric . equal_error_rate ( y_true = y_true , y_score = y_score ) else : eer = None return { 'count' : { 'Nref' : self . overall [ 'Nref' ] , 'Nsys' : self . overall [ 'Nsys' ] , } , 'f_measure' : { 'f_measure' : f_measure , 'precision' : precision , 'recall' : recall , } , 'eer' : { 'eer' : eer } }
Overall metrics

        Returns
        -------
        dict
            results in a dictionary format