반응형

Deep learning 관련 논문을 볼 때 top-1 와 top-5 error 라는 용어들이 나온다.

top-1와 top-5 error는 이미지 분류성능을 평가하기 위한 것 들이다.

 

Top-1 accuracy is the conventional accuracy, which means that the model answer (the one with the highest probability) must be exactly the expected answer.

Top-5 accuracy means that any of your model that gives 5 highest probability answers that must match the expected answer.

 

A picture of a cat is shown, and these are the outputs of your neural network:

예:

  • Tiger: 0.4
  • Dog: 0.3
  • Cat: 0.1
  • Lynx: 0.09
  • Lion: 0.08
  • Bird: 0.02
  • Bear: 0.01

 

In the above-mentioned probabilities:

Using top-1 accuracy, you will count this output as wrong, because it predicted a tiger.

Using top-5 accuracy, you count this output as correct, because the cat is among the top-5 guesses.

 

top-5 accuracy : 이미지 50개를 분류하는데 , 앞의 5개의 class 를 최대 확률 의 분류를  찾은 다음 , 정확한 label이 

앞의 5개에 있는지 확인한다. 있으면 분류 성공했다.

 

--------------------------------------------------------------------------------------------------------------------------------

 

예를 들어 :

정답 Ground Truth : cat 

예측한 결과 :  prediction : 0.4 Tiger

예:

  • Tiger: 0.4
  • Dog: 0.3
  • Cat: 0.1
  • Lynx: 0.09
  • Lion: 0.08
  • Bird: 0.02
  • Bear: 0.01

top-1 은 False 

top-5 은 Tiger, Dog, Cat, Lynx, Lion 중에서 Cat이 있어서  True이다. 

 

 

 

<참고 자료 >:

https://intellipaat.com/community/6715/evaluation-calculate-top-n-accuracy-top-1-and-top-5

반응형

'Deep learning > 개념' 카테고리의 다른 글

Optimizer  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
알고리즘 개념  (0) 2021.03.21
선형회귀분석 ,군집화 ,다층 계층 신경망 ,병렬처리 ,부록 A: 한국어판 : 순환 신경망과 LSTM  (0) 2020.08.18

+ Recent posts