map(平均平均精度_客戶的平均平均精度

map(平均平均精度

Disclaimer: this was created for my clients because it’s rather challenging to explain such a complex metric in simple words, so don’t expect to see much of math or equations here. And remember that I try to keep it simple.

免責聲明 :這是為我的客戶創建的,因為用一個簡單的詞來解釋這樣一個復雜的指標是相當困難的,因此不要期望在這里看到太多的數學或方程式。 并記住,我嘗試使其保持簡單。

準確性 (Accuracy)

Accuracy is the most vanilla metric out there. Imagine we are doing classification of whether there is a dog in a picture. In order to test our classifier, we prepare a test set with pictures of both containing dogs and not. We then apply our classifier to every picture and get the predicted classes.

準確性是目前最常用的指標。 假設我們正在對圖片中是否有狗進行分類。 為了測試我們的分類器,我們準備了一個包含不包含狗的圖片的測試集。 然后,我們將分類器應用于每張圖片,并獲得預測的分類。

So we can then calculate accuracy using this simple formula.

這樣我們就可以使用此簡單公式來計算準確性。

精度和召回率 (Precision and recall)

There are many more ways to determine how well a model works and two others are precision and recall. They show a bit different things and usually go in a pair.

還有許多方法可以確定模型的運行狀況,還有兩種方法可以提高精度召回率 。 它們顯示出一些不同的東西,通常成對出現。

Going on with our dog recognizer, precision shows how many of predicted dogs are actually dogs.

繼續我們的狗識別器, 精度顯示出實際上有多少只預測的狗。

And recall is the ratio of correctly predicted dogs to the amount of dogs in our test set.

回憶是正確預測的狗與測試集中狗的數量之比。

(Example)

Let’s imagine that our test set contains 12 pictures with dogs and 8 pictures with no dogs. We apply our classifier and get 8 pictures predicted as “dog” and the rest 12 are “no dog”. And out of those 8 marked as “dog” only 5 are actually “dog” and the rest are just wrong.

假設我們的測試集包含12張有狗的圖片和8張無狗的圖片。 我們應用分類器,得到8張預測為“狗”的圖片,其余12張為“無狗”。 在這8個標記為“狗”的動物中,只有5個實際上是“狗”,其余的都是錯誤的。

So our precision is

所以我們的精度

Image for post
Precision
精確

And our recall is

我們的回憶

Image for post
Recall
召回

Why to use precision and recall?

為什么要使用精度和召回率?

This two metrics give us a deeper understanding of errors that our model makes, hence allowing us to analyze and create better solutions. And because of this in-depth understanding we stick to them and not to the accuracy metric.

這兩個指標使我們對模型所產生的錯誤有更深入的了解,從而使我們能夠分析和創建更好的解決方案。 并且由于這種深入的了解,我們堅持使用它們而不是準確性指標。

聯合路口 (Intersection over union)

In order to fully understand the mean average precision metric we need to know what intersection over union is.

為了完全理解平均平均精度度量,我們需要知道什么是聯合的交集。

It comes up when we create object detection solutions and is needed for determining how well we find an object in a picture.

當我們創建對象檢測解決方案時,它就會出現,這是確定我們在圖片中找到對象的程度所需要的。

Image for post
source)來源 )

Not only do we need to classify an object but also to locate it. Those little colourful rectangles are called bounding boxes.

我們不僅需要對對象進行分類,還需要對其進行定位。 那些小的彩色矩形稱為邊界框。

So let’s say we have an object detection model but in a what way do we measure how well it detects? That’s when intersection over union (IoU) comes in handy.

因此,假設我們有一個對象檢測模型,但是以什么方式衡量它的檢測效果呢? 那時,聯合交叉口(IoU)派上了用場。

In order to compute this we need a test set with so called ground truth bounding boxes and, of course, they must be labeled at first, so that when it comes to testing we can compare the real data with the predicted data.

為了計算這一點,我們需要一個帶有所謂的地面真實邊界框的測試集,當然,它們必須首先被標記,以便在進行測試時,我們可以將真實數據與預測數據進行比較。

Let’s say that the green boxes are our ground truth bounding boxes (the boxes we labeled beforehand by our human hands and eyes) and the red ones are predicted by our model.

假設綠色框是我們的地面真值邊界框(我們用人的手和眼睛預先標記的框),紅色框是我們的模型預測的。

Image for post
source)源 )

And the formula is now very simple

現在公式很簡單

Image for post
source)來源 )

To clarify, it’s a ratio of the overlapping (or intersecting) area between a ground truth bounding box and a predicted one and the union area of those two.

為了闡明這一點,它是地面真值邊界框和預測的邊界框之間的重疊(或相交)區域與這兩個區域的并集區域之比。

平均平均精度 (Mean Average Precision)

So what is mean average precision (mAP) then? To calculate it we need to set a threshold value for IoU, for example, 0.5. It means that we say that the object is detected when we located 50% of that object in a bounding box.

那么什么是平均精度 (mAP)呢? 要計算它,我們需要為IoU設置一個閾值,例如0.5。 這意味著當我們在邊界框中找到該對象的50%時,便表示已檢測到該對象。

Then all we have to do is to calculate precision and recall values. There is a way to combine those two into one value but it’s a bit more advanced so we are not going to cover it here.

然后,我們要做的就是計算精度和召回值。 有一種方法可以將這兩個值合并為一個值,但是它要先進一些,因此我們不在這里介紹。

And after that we change the threshold value for IoU with a tiny step. For instance, the next threshold will be 0.55. Then again computing precision and recall values.

之后,我們只需一步就可以更改IoU的閾值。 例如,下一個閾值將是0.55。 然后再次計算精度并調用值。

And again changing the threshold value for IoU. Now it will be 0.6. Again calculating precision and recall values. Usually those threshold values begin with 0.5 and go on up to 0.9 with a step of 0.05.

并再次更改IoU的閾值。 現在將是0.6。 再次計算精度和召回值。 通常,這些閾值以0.5開頭,然后以0.05為步長直到0.9。

And then mean average precision is that combined value of precision and recall averaged over all the thresholds.

然后,平均平均精度是指在所有閾值上平均的精度和召回率的總和。

它顯示什么? (What does it show?)

It shows how well a model classifies objects with different detection threshold values. The higher the value, the better the model. Results are vary highly but usually a well working model has mAP of 0.45–0.5 on a complex task.

它顯示了模型對具有不同檢測閾值的對象進行分類的效果。 值越高,模型越好。 結果差異很大,但正常工作的模型通常在復雜任務上的mAP為0.45-0.5。

You can check out example of models’ mAP on COCO dataset here: https://pjreddie.com/darknet/yolo/.

您可以在以下位置查看COCO數據集上模型的mAP示例: https ://pjreddie.com/darknet/yolo/。

Hope, it helps you.

希望對您有幫助。

Connect with me on Twitter, LinkedIn, Facebook and follow on GitHub!

Twitter LinkedIn Facebook 上與我聯系 然后在 GitHub上關注我

翻譯自: https://medium.com/@poddiachyi/mean-average-precision-for-clients-aecb0b039ac9

map(平均平均精度

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389815.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389815.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389815.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Sublime Text 2搭建Go開發環境,代碼提示+補全+調試

本文在已安裝Go環境的前提下繼續。 1、安裝Sublime Text 2 2、安裝Package Control。 運行Sublime,按下 Ctrl(在Tab鍵上邊),然后輸入以下內容: import urllib2,os,hashlib; h 7183a2d3e96f11eeadd761d777e62404 e330…

629. K個逆序對數組

629. K個逆序對數組 給出兩個整數 n 和 k&#xff0c;找出所有包含從 1 到 n 的數字&#xff0c;且恰好擁有 k 個逆序對的不同的數組的個數。 逆序對的定義如下&#xff1a;對于數組的第i個和第 j個元素&#xff0c;如果滿i < j且 a[i] > a[j]&#xff0c;則其為一個逆…

zookeeper、hbase常見命令

a) Zookeeper&#xff1a;幫助命令-help i. ls /查看zk下根節點目錄 ii. create /zk_test my_data//在測試集群沒有創建成功 iii. get /zk_test my_data//獲取節點信息 iv. set / zk_test my_data//更改節點相關信息 v. delete /zk_test//刪除節點信…

鮮活數據數據可視化指南_數據可視化實用指南

鮮活數據數據可視化指南Exploratory data analysis (EDA) is an essential part of the data science or the machine learning pipeline. In order to create a robust and valuable product using the data, you need to explore the data, understand the relations among v…

2049. 統計最高分的節點數目

2049. 統計最高分的節點數目 給你一棵根節點為 0 的 二叉樹 &#xff0c;它總共有 n 個節點&#xff0c;節點編號為 0 到 n - 1 。同時給你一個下標從 0 開始的整數數組 parents 表示這棵樹&#xff0c;其中 parents[i] 是節點 i 的父節點。由于節點 0 是根&#xff0c;所以 p…

Linux lsof命令詳解

lsof&#xff08;List Open Files&#xff09; 用于查看你進程開打的文件&#xff0c;打開文件的進程&#xff0c;進程打開的端口(TCP、UDP)&#xff0c;找回/恢復刪除的文件。是十分方便的系統監視工具&#xff0c;因為lsof命令需要訪問核心內存和各種文件&#xff0c;所以需要…

史密斯臥推:杠鈴史密斯下斜臥推、上斜機臥推、平板臥推動作圖解

史密斯臥推&#xff1a;杠鈴史密斯下斜臥推、上斜機臥推、平板臥推動作圖解 史密斯臥推&#xff08;smith press&#xff09;是固定器械上完成的臥推&#xff0c;對于初級健身者來說&#xff0c;自由臥推&#xff08;啞鈴臥推、杠鈴臥推&#xff09;還不能很好地把握平衡性&…

圖像特征 可視化_使用衛星圖像可視化建筑區域

圖像特征 可視化地理可視化/菲律賓/遙感 (GEOVISUALIZATION / PHILIPPINES / REMOTE-SENSING) Big data is incredible! The way Big Data manages to bring sciences and business domains to new levels is almost sort of magical. It allows us to tap into a variety of a…

ELK入門01—Elasticsearch安裝

1. 安裝 首先從官網下載安裝包此處我們選擇2.4.6這個版本,然后下載tar壓縮包下載以后直接解壓&#xff0c;就算安裝完成了 tar zxvf elasticsearch-2.4.6.tar.gz 2. 配置 編輯elasticsearch配置文件 # 進入安裝目錄 cd elasticsearch-2.4.6 # 編輯配置文件 vi ./config/elastic…

375. 猜數字大小 II

375. 猜數字大小 II 我們正在玩一個猜數游戲&#xff0c;游戲規則如下&#xff1a; 我從 1 到 n 之間選擇一個數字。你來猜我選了哪個數字。如果你猜到正確的數字&#xff0c;就會 贏得游戲 。如果你猜錯了&#xff0c;那么我會告訴你&#xff0c;我選的數字比你的 更大或者更…

hdu_2048 錯排問題

錯排問題本質上就是一個動態規劃問題&#xff0c;其狀態轉移方程為&#xff1a; 記d[n]為n個人錯排情況的總數。 那么策略可以描述為&#xff1a;分析第n個人錯排的可能情況&#xff1a; 1&#xff09;前n-1個人滿足錯排的情況&#xff0c;那么第n個人加入后還要錯排意味著第n個…

海量數據尋找最頻繁的數據_在數據中尋找什么

海量數據尋找最頻繁的數據Some activities are instinctive. A baby doesn’t need to be taught how to suckle. Most people can use an escalator, operate an elevator, and open a door instinctively. The same isn’t true of playing a guitar, driving a car, or anal…

OSChina 周四亂彈 —— 要成立復仇者聯盟了,來報名

2019獨角獸企業重金招聘Python工程師標準>>> Osc亂彈歌單&#xff08;2018&#xff09;請戳&#xff08;這里&#xff09; 【今日歌曲】 Devoes &#xff1a;分享吳若希的單曲《越難越愛 (Love Is Not Easy / TVB劇集《使徒行者》片尾曲)》: 《越難越愛 (Love Is No…

2023. 連接后等于目標字符串的字符串對

2023. 連接后等于目標字符串的字符串對 給你一個 數字 字符串數組 nums 和一個 數字 字符串 target &#xff0c;請你返回 nums[i] nums[j] &#xff08;兩個字符串連接&#xff09;結果等于 target 的下標 (i, j) &#xff08;需滿足 i ! j&#xff09;的數目。 示例 1&…

webapi 找到了與請求匹配的多個操作(ajax報500,4的錯誤)

1、ajax報500,4的錯誤&#xff0c;然而多次驗證自己的后臺方法沒錯。然后跟蹤到如下圖的錯誤信息&#xff01; 2、因為兩個函數都是無參的&#xff0c;返回值也一樣。如下圖 3&#xff0c;我給第一個函數加了一個參數后&#xff0c;就不報錯了&#xff0c;所以我想&#xff0c;…

可視化 nlp_使用nlp可視化尤利西斯

可視化 nlpMy data science experience has, thus far, been focused on natural language processing (NLP), and the following post is neither the first nor last which will include the novel Ulysses, by James Joyce, as its primary target for NLP and literary elu…

區分'方法'和'函數'

區分方法: 1在類中的叫方法,在類外面的叫函數 2在名字前加 對象名. 的叫方法, 在名字前加 類名. 或 只寫名字的 叫函數 通過代碼進行區分: 1 from types import MethodType,FunctionType 2 def check(arg): 3 if isinstance(arg,MethodType)#判斷第一個參數是否是第二個參數…

520. 檢測大寫字母

520. 檢測大寫字母 我們定義&#xff0c;在以下情況時&#xff0c;單詞的大寫用法是正確的&#xff1a; 全部字母都是大寫&#xff0c;比如 “USA” 。單詞中所有字母都不是大寫&#xff0c;比如 “leetcode” 。如果單詞不只含有一個字母&#xff0c;只有首字母大寫&#xf…

Java 打包 FatJar 方法小結

在函數計算(Aliyun FC)中發布一個 Java 函數&#xff0c;往往需要將函數打包成一個 all-in-one 的 zip 包或者 jar 包。Java 中這種打包 all-in-one 的技術常稱之為 Fatjar 技術。本文小結一下 Java 里打包 FatJar 的若干種方法。 什么是 FatJar FatJar 又稱作 uber-Jar&#x…

常見問題及解決方案(前端篇)

一、jquery validate 默認校驗規則序號 規則 描述1 requiredtrue 必須輸入的字段。2 remote "check.php" 使用 ajax 方法調用 check.php 驗證輸入值。3 emailtrue 必須輸入正確格式的電子郵件。4 urltrue 必須輸入正確格式的網址。5 datetrue 必須輸入正確格式的日期…