Notation :
Number of training examples
"input" variable / features
"output" variable / "target" variable
one training example
th training example
Model Representation은 간단하다. Learning algorithm을 이용하여 Training set으로부터 h(hypothesis)를 도출해낸다. 이후 h를 활용하여 x로부터 y를 예측한다.
가설 함수(hypothesis function)이 얼마나 정확한지 확인하는 방법은 cost function을 이용해서 할 수 있다. 이는 가설함수를 통해 예측한 y의 값이 실제의 y값과 얼마나 차이가 나는지를 이용하여 알 수 있다. 도식화하면 다음과 같다.
이렇게 얻어진 세타와 관련한 함수를 Cost Function이라 한다. 또한 Squared error function 혹은 Mean Squared Error이라 하기도 한다.
이때,
로 표현할 수 있는데 의 값에 따라 다른 Cost Function이 그려지게 된다.