欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

EER有什么用

這篇文章主要介紹“EER有什么用”,在日常操作中,相信很多人在EER有什么用問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”EER有什么用”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!

創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供巴州網(wǎng)站建設(shè)、巴州做網(wǎng)站、巴州網(wǎng)站設(shè)計(jì)、巴州網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、巴州企業(yè)網(wǎng)站模板建站服務(wù),十余年巴州做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

   FRR(False Rejection Rate)和FAR(False Acceptance Rate)是用來(lái)評(píng)估指紋識(shí)別算法性能的兩個(gè)主要參數(shù)。

   FRR通俗叫法是拒真率的意思,標(biāo)準(zhǔn)稱謂是 FNMR(False Non-Match Rate 不匹配率)。可以通俗的理解為“把應(yīng)該相互匹配成功的指紋當(dāng)成不能匹配的指紋”的概率。

     Equal Error Rate , 這個(gè)在說(shuō)話人識(shí)別,說(shuō)話人確認(rèn)中最常用的評(píng)價(jià)標(biāo)準(zhǔn),是一種使錯(cuò)誤接受率(nontarget_is_target / (target_is_target + nontarget_is_target)) 和 錯(cuò)誤拒絕

率(target_is_nontarget / (target_is_nontarget + nontarget_is_nontarget))的一個(gè)相對(duì)平衡點(diǎn)閾值點(diǎn),然后這個(gè)閾值點(diǎn)可以作為實(shí)際使用階段的固定的閾值。

   如 得分非 -170----A-------threshold ------B------- +100    按理來(lái)說(shuō) A 中都是nontarget, B中都是target。 如果在A 中出現(xiàn)了target 就是錯(cuò)誤拒絕了,如果在B 中出現(xiàn)了

nontarget  就是錯(cuò)誤接收了

   FAR一般稱為認(rèn)假率,其標(biāo)準(zhǔn)稱謂是FMR(False Match Rate 錯(cuò)誤匹配率)。FMR是用來(lái)評(píng)估指紋識(shí)別算法性能的最重要參數(shù)。可以通俗的理解為“把不應(yīng)該匹配的指紋當(dāng)成匹配

的指紋”的概率。

   FAR是隨閾值增大而減小的,F(xiàn)RR是隨閾值增大而增大的。因此它們一定有交點(diǎn)。這個(gè)點(diǎn)是在某個(gè)閾值下的FAR與FRR等值的點(diǎn)。習(xí)慣上用這一點(diǎn)的值來(lái)衡量算法的綜合性能。

對(duì)于一個(gè)更優(yōu)的指紋算法,希望在相同閾值情況下,F(xiàn)AR和FRR都越小越好。

   把FAR和FRR曲線都向下平移。同時(shí)相交點(diǎn)ERR也向下平移。所以EER值越小的時(shí)候,表示算法的整體性能越高。   

Equal Error Rate , 這個(gè)在說(shuō)話人識(shí)別,說(shuō)話人確認(rèn)中最常用的評(píng)價(jià)標(biāo)準(zhǔn),是一種使錯(cuò)誤接受率(nontarget_is_target / (target_is_target + nontarget_is_target)) 和 錯(cuò)誤拒絕率(target_is_nontarget / (target_is_nontarget + nontarget_is_nontarget))的一個(gè)相對(duì)平衡點(diǎn)閾值點(diǎn),然后這個(gè)閾值點(diǎn)可以作為實(shí)際使用階段的固定的閾值。 
還記得trials文件嘛,還記得沒(méi)有cvs文件自己偽造trials文件嘛, 還記得不明白為什么要制造50%或者80%的nontarget嘛,就是為了要計(jì)算EER。所以在偽造trials文件的時(shí)候,最好是分布均勻,也就是要涉及到每一個(gè)人,每一個(gè)人都要有一定數(shù)量的nontarget,其實(shí)也可以每個(gè)人對(duì)其他所有人都做一個(gè)nontarget,到底是取一部分還是所有的這個(gè)我也不確定,等驗(yàn)證過(guò)后再更新(記得驗(yàn)證)。

-->先說(shuō)一些EER的計(jì)算: 
false reject and false accept. Clearly, the false reject rate and the false accept rate depend on the threshold. When the two rates are equal, the common value is called equal error rate (EER).

什么是false reject(用fr表示), 就是本來(lái)應(yīng)該accept 的結(jié)果 reject了: 
FR = target_is_nontarget / (target_is_nontarget + nontarget_is_nontarget) 
而false accept(用fa表示),就是本來(lái)應(yīng)該reject的結(jié)果accept了: 
FA = nontarget_is_target / (target_is_target + nontarget_is_target) 
當(dāng)E(fr) = E(fa) = E 時(shí), E即 EER的值。 
-->維基百科ROC曲線 https://zh.wikipedia.org/wiki/ROC曲線 
--> 然后看一下kaldi源碼: 
eer=compute-eer <(python local/prepare_for_eer.py $trials local/scores_gmm_${num_components}_${x}_${y}/plda_scores) 2> /dev/null
單獨(dú)運(yùn)行: 
python local/prepare_for_eer.py data/test/trials exp/scores_gmm_2048_ind_female/plda_scores 
結(jié)果:

-30.99115 target
-28.06169 target
-17.78868 target
-87.6428 nontarget
-74.32495 nontarget
-74.18333 nontarget
-5.662024 target
-7.832421 target
-26.46083 target
-74.93365 nontarget
-86.17784 nontarget
-50.90917 nontarget
-26.51904 target
-14.09044 target
...
#Ki就是上面的lines流, 把沒(méi)用的代碼全都刪掉,可以去看kaldi的源碼
 while (std::getline(ki.Stream(), line)) {
      std::vector<std::string> split_line;
      SplitStringToVector(line, " \t", true, &split_line);
      BaseFloat score;
      if (split_line[1] == "target")
        target_scores.push_back(score);
      else if (split_line[1] == "nontarget")
        nontarget_scores.push_back(score);
      else 
        KALDI_ERR << "blablabla"
    }
    BaseFloat threshold;
    #定義一個(gè)threshold,兩個(gè)list: target_scores, nontarget_scores
    BaseFloat eer = ComputeEer(&target_scores, &nontarget_scores, &threshold);
    KALDI_LOG << "Equal error rate is " << (100.0 * eer)
              << "%, at threshold " << threshold;
    std::cout.precision(4);
    std::cout << (100.0 * eer);
    return 0;

下面看ComputeEer(&target_scores, &nontarget_scores, &threshold)的實(shí)現(xiàn)

 {
  #將兩個(gè)都從大到小排列
  std::sort(target_scores->begin(), target_scores->end());
  std::sort(nontarget_scores->begin(), nontarget_scores->end());

  size_t target_position = 0,
      target_size = target_scores->size();
  for (; target_position + 1 < target_size; target_position++) {
        size_t nontarget_size = nontarget_scores->size(), #計(jì)算nontarget的個(gè)數(shù)
        #比如nontarget_size=100 ,target_size=100 這個(gè) nontarget_n 屬于[0,100], 
        #所以nontarget_positon 從99到-1
        nontarget_n = nontarget_size * target_position * 1.0 / target_size; 
        nontarget_position = nontarget_size - 1 - nontarget_n;
    if (nontarget_position  < 0)
      nontarget_position = 0;
    #所以當(dāng)nontarget_position 小于 target_position 的值的時(shí)候
    if ((*nontarget_scores)[nontarget_position] <
        (*target_scores)[target_position])
      break;
  }
  *threshold = (*target_scores)[target_position];
  BaseFloat eer = target_position * 1.0 / target_size;
  return eer;
}
要理解這個(gè)函數(shù)的實(shí)現(xiàn),其實(shí)在compute-eer里邊還是一行注釋:
ComputeEer computes the Equal Error Rate (EER) for the given scores
   and returns it as a proportion beween 0 and 1.
   If we set the threshold at x, then the target error-rate is the
   proportion of target_scores below x; and the non-target error-rate
   is the proportion of non-target scores above x.  We seek a
   threshold x for which these error rates are the same; this
   error rate is the EER.

   We compute this by iterating over the positions in target_scores: 0, 1, 2,
   and so on, and for each position consider whether the cutoff could be here.
   For each of these position we compute the corresponding position in
   nontarget_scores where the cutoff would be if the EER were the same.
   For instance, if the vectors had the same length, this would be position
   length() - 1, length() - 2, and so on.  As soon as the value at that
   position in nontarget_scores at that position is less than the value from
   target_scores, we have our EER.
下面拿一個(gè)例子用python簡(jiǎn)單模擬一下:
#coding: utf-8
'''
首先計(jì)算這一步,將target的得分和nontarget的得分文件
python local/prepare_for_eer.py data/test/trials exp/scores_gmm_2048_ind_female/plda_scores > scores
'''
target_scores = []
nontarget_scores = []
f = open('scores').readlines()
#將兩個(gè)數(shù)組讀出來(lái)
for line in f:
    splits = line.strip().split(' ')
    if splits[1] == 'target':
        target_scores.append(eval(splits[0]))
    else:
        nontarget_scores.append(eval(splits[0]))

#排序,從小到大排序
target_scores = sorted(target_scores)
nontarget_scores = sorted(nontarget_scores)

print target_scores

target_size = len(target_scores)
target_position = 0
for target_position in range(target_size):
    nontarget_size = len(nontarget_scores)
    nontarget_n = nontarget_size * target_position * 1.0 / target_size
    nontarget_position = int(nontarget_size - 1 - nontarget_n)
    if nontarget_position < 0:
        nontarget_position = 0
    if nontarget_scores[nontarget_position] < target_scores[target_position]:
        print "nontarget_scores[nontarget_position] is",  nontarget_position, nontarget_scores[nontarget_position]
        print "target_scores[target_position] is",  target_position, target_scores[target_position]
        break

threshold = target_scores[target_position]
print "threshold is --> ",  threshold
eer = target_position * 1.0 / target_size
print "eer is --> ",  eer

到此,關(guān)于“EER有什么用”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!

本文題目:EER有什么用
轉(zhuǎn)載源于:http://chinadenli.net/article22/goisjc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版企業(yè)網(wǎng)站制作企業(yè)建站網(wǎng)站制作網(wǎng)站內(nèi)鏈標(biāo)簽優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站