티스토리 뷰
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 가 동시에 증가하는 양상을 보인다.
'Deep learning (일반)' 카테고리의 다른 글
Sparse vectors / Dense vectors (0) | 2020.12.30 |
---|---|
Optimizer vs Cost function (0) | 2020.06.27 |
뉴럴 네트워크 & 뉴런 - units 개수와 weight shape 이해하기! (2) | 2019.10.05 |
- Total
- Today
- Yesterday
- Attention Mechanism
- 워터마킹
- Pre-trained LM
- 뉴런
- weight vector
- language model
- nlp
- neurone
- LM
- word embedding
- 뉴럴넷
- Bert
- 벡터
- cs224n
- GPTZero
- Neural Language Model
- transformer
- Statistical Language Model
- neural network
- 언어모델
- Contextual Embedding
- Elmo
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |