当前位置:网站首页>Analysis of Top1 accuracy and top5 accuracy examples
Analysis of Top1 accuracy and top5 accuracy examples
2022-07-06 07:59:00 【The story has turned several pages】
top1-Accuracy,top5-Accuracy Example analysis
Symbol definition :
TP(True Positive): The number of positive samples labeled and classified
FN(False Negative): The number of samples with positive labels and negative labels
FP(False Positive): The number of samples with negative labels and positive labels
TN(True Negative): The number of negative samples labeled and classified
A c c u r a c y = T P + F N T P + F N + F P + T N Accuracy =\dfrac{TP+FN}{TP+FN+FP+TN} Accuracy=TP+FN+FP+TNTP+FN
T o p − 1 A c c u r a c y = ∑ i = 0 N − 1 ( f ( x i ) = = y i ) N Top-1 Accuracy = \dfrac{\sum^{N-1}_{i=0}(f(x_i)==y_i)}{N} Top−1Accuracy=N∑i=0N−1(f(xi)==yi), among x i x_i xi The categories of are y i y_i yi, The category is N, f f f For the prediction category function .
Practical significance : For a picture , After the network prediction category , If the maximum probability value contains the correct answer , That is to say, it is believed that .T o p − 5 A c c u r a c y Top-5 Accuracy Top−5Accuracy
Supplementary examples :
Let a dataset have 10 Categories : Dog 、 cat 、 chicken 、 cattle 、 fish 、 rabbit 、 rat 、 Horse 、 bird 、 Dragonfly .
Use the trained model to predict what kind of animals in a picture belong to , There is a picture of a dog , If predicted : Dog (98%)、 cat (90%)、 chicken (80%)、 cattle (60%)、 fish (40%)、 rabbit (30%)、 rat (25%)、 Horse (20%)、 bird (10%)、 Dragonfly (5%).
For this picture t o p 1 − A c c u r a c y top1-Accuracy top1−Accuracy by 100%, The category with the highest probability is correct if it is the same as the actual category , The most likely one is the dog , by 98%.
For this picture t o p 5 − A c c u r a c y top5-Accuracy top5−Accuracy by 100%, Before the highest probability 5 If one of the categories is the same as the actual category . Include dogs in the top five probability (98%)、 cat (90%)、 chicken (80%)、 cattle (60%)、 fish (40%), Among them are dogs .
conversely , If predicted : cat (98%)、 cattle (90%)、 Dog (80%)、 chicken (60%)、 fish (40%)、 rabbit (30%)、 rat (25%)、 Horse (20%)、 bird (10%)、 Dragonfly (5%).
For this picture t o p 1 − A c c u r a c y top1-Accuracy top1−Accuracy by 0%, The most likely one is the cat , Not a dog .
For this picture t o p 5 − A c c u r a c y top5-Accuracy top5−Accuracy by 100%, Before the highest probability 5 If one of the categories is the same as the actual category . Include cats in the top five probability (98%)、 cattle (90%)、 Dog (80%)、 chicken (60%)、 fish (40%), There are dogs .
边栏推荐
- Data governance: metadata management
- 数据治理:元数据管理篇
- Solution: intelligent site intelligent inspection scheme video monitoring system
- NFT smart contract release, blind box, public offering technology practice -- contract
- 二叉树创建 & 遍历
- wincc7.5下载安装教程(Win10系统)
- PHP - Common magic method (nanny level teaching)
- Asia Pacific Financial Media | "APEC industry +" Western Silicon Valley invests 2trillion yuan in Chengdu Chongqing economic circle to catch up with Shanghai | stable strategy industry fund observatio
- shu mei pai
- Epoll and IO multiplexing of redis
猜你喜欢
![DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist](/img/17/415e66d67afb055e94a966de25c2bc.png)
DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist
![datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在](/img/17/415e66d67afb055e94a966de25c2bc.png)
datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在

Easy to use tcp-udp_ Debug tool download and use

Learn Arduino with examples

Linked list interview questions (Graphic explanation)

珠海金山面试复盘
![08- [istio] istio gateway, virtual service and the relationship between them](/img/fb/09793f5fd12c2906b73cc42722165f.jpg)
08- [istio] istio gateway, virtual service and the relationship between them

Asia Pacific Financial Media | designer universe | Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers

24. Query table data (basic)

让学指针变得更简单(三)
随机推荐
esRally国内安装使用避坑指南-全网最新
Helm install Minio
649. Dota2 Senate
Notes on software development
[cf gym101196-i] waif until dark network maximum flow
Key value judgment in the cycle of TS type gymnastics, as keyword use
1202 character lookup
Vit (vision transformer) principle and code elaboration
Get the path of edge browser
珠海金山面试复盘
Asia Pacific Financial Media | designer universe | Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers
"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
On why we should program for all
Interview Reply of Zhuhai Jinshan
软件开发的一点随记
Easy to use tcp-udp_ Debug tool download and use
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
MFC sends left click, double click, and right click messages to list controls
CAD ARX 获取当前的视口设置
opencv学习笔记八--答题卡识别