Negative Log Likelihood
machine learning 은 주어진 데이터만으로 미지의 최적 모델에 대한 parameter 를 찾아야 한다.
classification 문제에서, 입력값 와 parameter 가 주어졌을 때, 정답 가 나타날 확률을 likelihood(우도) 로 표현할 수 있다. likelihood 를 최대화하는 가 바로 우리가 찾고 싶은 결과라고 해석가능하다: Maximum Likelihood Estimation
여기서 likelihood 를 scale 해도 의 결과는 동일하므로, likelihood 에 Log scale 을 적용할 수 있다. Log scale 을 사용하는 이유는 (a) it does not suffer from numerical underflow, and (b) the differentiation rules will turn out simpler 이기 때문이다.
또한, loss function 의 값을 최적화 한다는 뜻에서, likelihood 를 최소화 한다는 의미로 바꾸면 좋다. 이를 위해 likelihood 에 음의 부호를 붙여서 argmax 를 argmin 으로 바꿔준다.
regularization: adding a penalty term to the NLL
- is the regularization parameter, is some form of complexity penalty
- 일반적으로 complexity penalty 는 로 설정하며, 여기서 는 의 prior 이다.
만약, 값이 log loss 고, 이면, 위 식은 다음과 같이 표현될 수 있다.
해당 식을 최소화 하는 것은 log posterior 를 최대화 하는 것과 같다 MAP 참조