Data & Computing머신 러닝University
AQAAPOntarioNSWCBSEGCE O-LevelMoECAPS
이진 교차 엔트로피 손실 Calculator
분류를 위한 손실 함수.
Use the free calculatorCheck the variablesOpen the advanced solver
Formula first
Overview
이진 교차 엔트로피 손실(로그 손실)은 두 확률 분포(실제 이진 레이블과 예측 확률) 간의 차이를 정량화합니다. 확신은 있지만 잘못된 예측에 큰 로그 페널티를 적용하여 경사 하강법과 같은 최적화 알고리즘이 모델 정확도를 향상시키도록 안내합니다.
Symbols
Variables
y = True Label (0/1), p = Predicted Prob, L = Loss
Apply it well
When To Use
When to use: 이 함수는 출력이 0과 1 사이의 단일 확률 값인 이진 분류 작업을 위해 특별히 설계되었습니다. 로지스틱 회귀 및 출력 계층에서 시그모이드 활성화 함수를 사용하는 신경망의 목적 함수로 가장 일반적으로 사용됩니다.
Why it matters: 단순한 분류 오류와 달리 이 손실 함수는 미분 가능하므로 딥 러닝의 역전파에 필수적입니다. 이는 모델이 '불확실하게 틀린' 것보다 '확신하며 틀린' 경우에 더 심하게 패널티를 받도록 하여 더 강건한 확률적 예측을 가능하게 합니다.
Avoid these traps
Common Mistakes
- 밑이 10인 로그를 사용하는 것(자연로그를 사용해야 합니다).
- p=0 또는 p=1로 정확히 두는 것(무한대를 유발합니다).
One free problem
Practice Problem
의료 진단 모델이 환자가 특정 상태일 확률을 0.85로 예측합니다. 환자가 실제로 그 상태를 가지고 있다면(y=1), 이진 교차 엔트로피 손실을 계산하십시오.
Hint: y=1이므로 공식은 L = -ln(p)로 단순화됩니다.
The full worked solution stays in the interactive walkthrough.
References
Sources
- Wikipedia: Cross-entropy
- Deep Learning by Ian Goodfellow, Yoshua Bengio, and Aaron Courville
- Deep Learning (Goodfellow, Bengio, Courville)
- Pattern Recognition and Machine Learning (Bishop)
- Goodfellow, Bengio, and Courville Deep Learning
- Bishop Pattern Recognition and Machine Learning
- Standard curriculum — Machine Learning