当前位置:网站首页>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 .
边栏推荐
- [Yugong series] creation of 009 unity object of U3D full stack class in February 2022
- 22. Empty the table
- [KMP] template
- Solution: intelligent site intelligent inspection scheme video monitoring system
- WebRTC系列-H.264预估码率计算
- flask返回文件下载
- [Yugong series] February 2022 U3D full stack class 011 unity section 1 mind map
- Document 2 Feb 12 16:54
- Learn Arduino with examples
- Key value judgment in the cycle of TS type gymnastics, as keyword use
猜你喜欢

继电反馈PID控制器参数自整定

22. Empty the table

Opencv learning notes 9 -- background modeling + optical flow estimation

Nft智能合约发行,盲盒,公开发售技术实战--合约篇

The Vice Minister of the Ministry of industry and information technology of "APEC industry +" of the national economic and information technology center led a team to Sichuan to investigate the operat

. Net 6 learning notes: what is NET Core

Key value judgment in the cycle of TS type gymnastics, as keyword use
![[untitled]](/img/38/bc025310b9742b5bf0bd28c586ec0d.jpg)
[untitled]

Esrally domestic installation and use pit avoidance Guide - the latest in the whole network

你想知道的ArrayList知识都在这
随机推荐
数字经济时代,如何保障安全?
NFT smart contract release, blind box, public offering technology practice -- contract
Uibehavior, a comprehensive exploration of ugui source code
What are the ways to download network pictures with PHP
Machine learning - decision tree
Wonderful use of TS type gymnastics string
二叉树创建 & 遍历
CAD ARX 获取当前的视口设置
Circuit breaker: use of hystrix
flask返回文件下载
. Net 6 learning notes: what is NET Core
[untitled]
1202 character lookup
Artcube information of "designer universe": Guangzhou implements the community designer system to achieve "great improvement" of urban quality | national economic and Information Center
http缓存,强制缓存,协商缓存
Get the path of edge browser
In the era of digital economy, how to ensure security?
Luogu p4127 [ahoi2009] similar distribution problem solution
Hackathon ifm
A Closer Look at How Fine-tuning Changes BERT