728x90

  머신 러닝 혹은 딥러닝의 궁극적인 목적은 loss function을 최소화하는 parameter를 찾는 것이다. 이 loss function에는 다양한 종류가 있다. 이 예시로는 discrete한 예측 label을 가지는 classification problem에서 사용되는 예측이 맞았을 때는 loss를 0으로 그리고 틀렸을 때는 1로 계산하는 zero-one loss부터 continuous한 예측 값을 가지는 regression problem에서 사용되는 l2 loss, l1 loss, huber loss 등 다양한 것이 있다. 이외에도 true probability distribution에 대해서 이에 맞는 probability distribution을 예측하는 probabilistic prediction problem에 사용되는 loss fuction도 존재한다. 이번 글에서는 이 probabilistic prediction problem의 loss function을 정의할 때의 원칙인 proper scoring rule이 무엇인지에 대해 알아보겠다.

 정의

  우리는 probabilisitc prediction problem에서 실제 probability distribution p에 가장 가까운 predictive distribution q를 찾는 것을 목적으로 한다. 그러므로 q가 p와 같을 때 loss fuction이 최소화되어야 적절한 loss function이라고 할 수 있을 것이다. 그러므로 우리는 proper scoring rule을 아래와 같이 정의할 수 있다.

proper scoring rule

 이 때, p=q일 때에만 equality를 만족하면 이를 strictly proper scoring rule이라고 부른다. 

예시

KL Divergence

 위 proper scoring rule을 만족하는 대표적인 loss function은 KL divergence이다. KL divergence는 아래와 같이 정의된다.

KL divergence의 정의

 이 식에서 p와 q가 같으면 KL divergence 값은 0이 되고(p/q=1이므로), 이는 KL divergence를 minimize하는 값이다. 그러므로 proper scoring rule을 만족한다.

Brier score

 Brier score는 아래와 같이 정의되고, 이는 해석하면 predictive distribution과 true distribution의 probability의 squared error를 의미한다.

Brier score의 정의

 이 식에서 p와 q가 같으면 Brier score 값은 0이 되고, 이는 Brier score를 minimize하는 값이다. 그러므로 이 또한 proper scoring rule을 만족한다. 

 이번 포스팅에서 우리는 proper scoring rule이 무엇인지와 함께 이를 만족하는 loss function에는 무엇이 있는지에 대해 알아보았다. 

References

1. Probabilistic Machine Learning: An Introduction by Kevin Patrick Murphy. MIT Press, February 2022.

300x250
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기