Advertisement

EER的知识点及其应用

阅读量:

文章目录

    • @[toc]
          • EER指标的计算方法
      • ROC曲线的基本原理
      • 示例代码展示

EER值计算方法

等错误概率(EER)作为说话人识别领域的重要评估指标,其定义为错误接受率(FA)与错误拒绝率(FR)之间的平衡临界点,该临界点可被设定为系统实际运行过程中的固定阈值。

复制代码
    def calculate_eer(y, y_score):
    # y denotes groundtruth scores,(真实标签)
    # y_score denotes the prediction scores.(经过softmax得到的标签)
    from scipy.optimize import brentq
    from sklearn.metrics import roc_curve
    from scipy.interpolate import interp1d
    
    fpr, tpr, thresholds = roc_curve(y, y_score, pos_label=1)
    eer = brentq(lambda x : 1. - x - interp1d(fpr, tpr)(x), 0., 1.)
    thresh = inte

全部评论 (0)

还没有任何评论哟~