loss, cost, objective function

in #kr-dev5 years ago (edited)

딥러닝 논문들을 보다보면 loss function 혹은 cost function 혹은 objective function을 이용해서 문제를 정의하고, 이를 해결하는 학습 전략을 세운다. 다들 잘 알고 있어서인지 세가지 함수에 대한 정의는 아무도 하지 않고 있다. 궁금증이 쌓여만 가던 와중에 함수들의 차이는 무엇인지에 대하여 stack overflow에서 논의가 이루어진 것이 있어, 이를 요약하여 정리하였다.

왜 이러한 함수들이 필요한가?

확률 기반 기계학습은 확률 변수($x_i$)와 확률 값($y_i$)의 쌍을 토대로 숨겨져 있는 확률 함수($f(x_i|\theta)$)를 기계가 찾도록 하는 것이 목적이다. 이를 위해 모형($f$)을 설계하고, 적절한 매개변수($\theta$)가 할당되도록 하는 학습 알고리즘을 개발한다. 이 과정에서 매개변수가 옳바른지 아닌지를 (사람의 추가적인 개입 없이) 판단하는 평가(estimation) 함수들이 필요한 것이다.

손실 함수 (loss function)

손실 함수는 데이터 각각에 대해 학습한 매개 변수로 이루어지는 확률 함수 결과 확률 값과 실제 확률 값의 오차를 측정하는 함수이다.

$$l(f(x_i|\theta), y_i)$$

비용 함수 (cost function)

비용 함수는 데이터 집합에 대한 오차 측정 함수이다.

$$Cost(\theta)={1 \over M} \sum^M_{i=1}(f(x_i|\theta), y_i)$$

목적 함수 (objective function)

목적 함수는 매개변수를 최적화 하는 함수이다.

예: Maximum Likelihood Estimation, k-Divergence

결론

실제로는 셋 모두 거의 같은 의미로 쓰인다. 모두 확률 모델의 매개변수의 오차를 구하기 위해 사용한다.

Reference

https://stats.stackexchange.com/questions/179026/objective-function-cost-function-loss-function-are-they-the-same-thing <- 이 글을 줄인 것에 지나지 않는다.


Sponsored ( Powered by dclick )
[코인蟲:지갑] 최고의 지갑, 300여 코인/토큰 지원하는 원자지갑 Atomic Wallet 설치하고 airdrop (추천코드 Promo Code = 102NR4)

[코인蟲:지갑] 최고의 지갑, 300여 코인/토큰 지원하는 원자지갑 Atomic Wallet ...

Sort:  

Hey @tmkor,

Your account is now 2 years old!

🎂 🎂 Happy Steemversary  🎂 🎂

Thanks for sticking around this long and believing in the future of this community.


My Steemversary is a smart bot that rewards active steemians on their account's anniversary. We use a bunch of tools to filter out inactive/blacklisted users and bots. Our goal is to gift these users a decent upvote. Please consider helping us grow by delegating to our bot [5SP10SP25SP50SP100SP500SP1000SPCustom Amount] or by simply upvoting this comment.

Congratulations @tmkor! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 63857.77
ETH 3117.63
USDT 1.00
SBD 3.87