Data & Computing정보 이론University
AQAAPOntarioNSWCBSEGCE O-LevelMoECAPS

KL 발산 (베르누이) Calculator

베르누이 분포에 대한 D_KL(p||q).

Use the free calculatorCheck the variablesOpen the advanced solver
This is the free calculator preview. Advanced walkthroughs stay in the app.
Result
Ready
KL Divergence

Formula first

Overview

베르누이 KL 발산은 두 베르누이 분포 간의 상대 엔트로피를 측정하여 분포 q를 사용하여 분포 p를 근사할 때 손실되는 정보를 정량화합니다. 공유 확률 공간에서 두 이진 결과 간의 통계적 거리를 특성화하는 비대칭 측정항목입니다.

Symbols

Variables

= KL Divergence, p = True Probability, q = Model Probability

KL Divergence
nats
True Probability
Variable
Model Probability
Variable

Apply it well

When To Use

When to use: 이 방정식은 이진 분류기의 성능을 평가하거나 이론적 모델을 관찰된 이진 빈도와 비교할 때 필수적입니다. 머신러닝에서 이진 교차 엔트로피와 같은 손실 함수의 구성 요소로, 그리고 정보 이론적 모델 선택의 맥락에서 자주 적용됩니다.

Why it matters: 이는 현실이 다른데도 한 확률 집합을 가정함으로써 발생하는 '놀라움' 또는 추가 비용을 측정하는 엄격한 방법을 제공합니다. 실제로 이 발산을 최소화하면 데이터 전송이 최적화되고 예측 모델이 가능한 한 실제 데이터 생성 프로세스에 가까워지도록 보장합니다.

Avoid these traps

Common Mistakes

  • p와 q를 서로 바꾸는 것(값이 달라집니다).
  • KL이 거리 측정이라고 가정하는 것 (실제로는 대칭이 아닙니다).

One free problem

Practice Problem

동전의 앞면이 나올 실제 확률이 p = 0.5인 것으로 알려져 있습니다. 연구자가 이 동전을 추정 확률 q = 0.2로 모델링하는 경우, 결과 KL 발산을 nats 단위로 계산하십시오.

Hint: p/q 및 (1-p)/(1-q) 항에 대해 자연 로그를 사용하여 값을 공식에 대입하십시오.

The full worked solution stays in the interactive walkthrough.

References

Sources

  1. Elements of Information Theory by Thomas M. Cover and Joy A. Thomas
  2. Deep Learning by Ian Goodfellow, Yoshua Bengio, and Aaron Courville
  3. Wikipedia: Kullback-Leibler divergence
  4. Cover and Thomas, Elements of Information Theory, 2nd ed.
  5. Wikipedia: Bernoulli distribution
  6. IUPAC Gold Book: relative entropy
  7. Cover and Thomas Elements of Information Theory