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.mzph.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…

zookeeper、hbase常见命令

a) Zookeeper:帮助命令-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…

Linux lsof命令详解

lsof(List Open Files) 用于查看你进程开打的文件,打开文件的进程,进程打开的端口(TCP、UDP),找回/恢复删除的文件。是十分方便的系统监视工具,因为lsof命令需要访问核心内存和各种文件,所以需要…

史密斯卧推:杠铃史密斯下斜卧推、上斜机卧推、平板卧推动作图解

史密斯卧推:杠铃史密斯下斜卧推、上斜机卧推、平板卧推动作图解 史密斯卧推(smith press)是固定器械上完成的卧推,对于初级健身者来说,自由卧推(哑铃卧推、杠铃卧推)还不能很好地把握平衡性&…

图像特征 可视化_使用卫星图像可视化建筑区域

图像特征 可视化地理可视化/菲律宾/遥感 (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…

375. 猜数字大小 II

375. 猜数字大小 II 我们正在玩一个猜数游戏,游戏规则如下: 我从 1 到 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乱弹歌单(2018)请戳(这里) 【今日歌曲】 Devoes :分享吴若希的单曲《越难越爱 (Love Is Not Easy / TVB剧集《使徒行者》片尾曲)》: 《越难越爱 (Love Is No…

2023. 连接后等于目标字符串的字符串对

2023. 连接后等于目标字符串的字符串对 给你一个 数字 字符串数组 nums 和一个 数字 字符串 target ,请你返回 nums[i] nums[j] (两个字符串连接)结果等于 target 的下标 (i, j) (需满足 i ! j)的数目。 示例 1&…

webapi 找到了与请求匹配的多个操作(ajax报500,4的错误)

1、ajax报500,4的错误,然而多次验证自己的后台方法没错。然后跟踪到如下图的错误信息! 2、因为两个函数都是无参的,返回值也一样。如下图 3,我给第一个函数加了一个参数后,就不报错了,所以我想,…

可视化 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…

本地搜索文件太慢怎么办?用Everything搜索秒出结果(附安装包)

每次用电脑本地的搜索都慢的一批,后来发现了一个搜索利器 基本上搜索任何文件都不用等待。 并且页面非常简洁,也没有任何广告,用起来非常舒服。 软件官网如下: voidtools 官网提供三个版本,用起来差别不大。 网盘链…

小程序入口传参:关于带参数的小程序扫码进入的方法

1.使用场景 1.医院场景:比如每个医生一个id,通过带参数二维码,扫码二维码就直接进入小程序医生页面 2.餐厅场景:比如每个菜一个二维码,通过扫码这个菜的二维码,进入小程序后,可以直接点这道菜&a…

python的power bi转换基础

I’ve been having a great time playing around with Power BI, one of the most incredible things in the tool is the array of possibilities you have to transform your data.我在玩Power BI方面玩得很开心,该工具中最令人难以置信的事情之一就是您必须转换数…

您是六个主要数据角色中的哪一个

When you were growing up, did you ever play the name game? The modern data organization has something similar, and it’s called the “Bad Data Blame Game.” Unlike the name game, however, the Bad Data Blame Game is played when data downtime strikes and no…

自定义按钮动态变化_新闻价值的变化定义

自定义按钮动态变化I read Bari Weiss’ resignation letter from the New York Times with some perplexity. In particular, I found her claim that she “was hired with the goal of bringing in voices that would not otherwise appear in your pages” a bit strange: …

Linux记录-TCP状态以及(TIME_WAIT/CLOSE_WAIT)分析(转载)

1.TCP握手定理 2.TCP状态 l CLOSED:初始状态,表示TCP连接是“关闭着的”或“未打开的”。 l LISTEN :表示服务器端的某个SOCKET处于监听状态,可以接受客户端的连接。 l SYN_RCVD :表示服务器接收到了来自客户端请求…

算法 从 数中选出_算法可以选出胜出的nba幻想选秀吗

算法 从 数中选出Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without …

django-rest-framework第一次使用使用常见问题

2019独角兽企业重金招聘Python工程师标准>>> 记录在第一次使用django-rest-framework框架使用时遇到的问题,为了便于理解在这里创建了Person和Grade这两个model from django.db import models class Person(models.Model):SHIRT_SIZES ((S, Small),(M, …