티스토리 뷰

 

http://www.jussihuotari.com/2018/01/17/why-loss-and-accuracy-metrics-conflict/

 

Why Loss and Accuracy Metrics Conflict? – Jussi Huotari's Web

A loss function is used to optimize a machine learning algorithm. An accuracy metric is used to measure the algorithm’s performance (accuracy) in an interpretable way. It goes against my intuition that these two sometimes conflict: loss is getting bett

www.jussihuotari.com

 

If the model becomes over-confident in its predictions, a single false prediction will increase the loss unproportionally compared to the (minor) drop in accuracy. An over-confident model can have good accuracy but bad loss. I’d assume over-confidence equals over-fitting.

 

1) overfit 된 모델에서 loss 가 높은 이유 

cross-entropy error 는 계산 방법할 때 ground truth 의 positive label 만 반영된다  -1 * log(model prediction value) 

* 참고 (https://gnoej671.tistory.com/26)

Over-confident 한 모델의경우 positive한 값에만 엄청 높은값을 주고, 나머지 class 에 대해서는 엄청 낮은 값을 주게 된다. 그렇기 때문에 ground truth 랑 model prediction class 가 다를 때, 그 class 에 너무 낮은 logit / softmax 값을 줄 거기 때문에 loss 가 확 뛰게 된다 (log0 는 infinity 값

 

2) 반면 accuracy 상으로는 1개만 틀린거라서 그만큼 차이가 나지 않게 됨.

=> 그래서 over-confident 한 모델, 즉 over-fitting 된 모델의 의 경우 accuracy 와 loss 가 동시에 증가하는 양상을 보인다.

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함