what is the difference?
cost function
- how well the current response surface h(x) fits the available data
- 일반적으로 많이 쓰는 Mean Squared Error 가 이에 해당함
- response surface = h(x) = 예측치 = predicted
- cost function 이 j2 > j1 이라는 것은 h1(x) 가 h2(x) 보다 better fit
- cost function은 model마다 상황마다 다름
- 추가로 왜 j 가 cost function을 뜻하는지 찾아보았다 (https://stackoverflow.com/questions/42420235/what-does-the-capital-letter-j-mean-in-cost-function-j%CE%B8)
As far as I know it comes from the Jacobian Matrix which represents the derivitave in all the directions. And because it has become the standard in machine learning it sticks.
loss function
- 아래는 svm 모델에서 쓰이는 hinge loss function
- 슬라이드 계산을 보면 신기하게도 이해가 간다.
- cost function과의 관계는 뭘까
what is the difference?
- loss function : defined on a data point / prediction & label / measures the penalty
- cost function : more general / a sum of loss functions over training set + some model complexity penalty (?)
- A loss function is a part of a cost function which is a type of an objective function.
- 외국인들도 헷갈려하는 개념인 것 같음
- single training example 이냐 entire training set이냐로 이해하면 큰 문제는 없을 것 같다.