Cost Function


## Error Function, J function
모든 input dataset에 대해서 오차를 계산하는 함수
each parameter
$$J(\theta) = \frac{1}{2}\Sigma_{i=1}^n(h_\theta(x^{(i)}) - y^{(i)})^2$$

### Matrix Vector notation
$$J(\theta) = \frac{1}{2}(X\theta - \vec{y})^T(X\theta - \vec{y})$$


### Lest squares cost function


> [Objective Function, Loss Function, Cost Function의 차이](https://ganghee-lee.tistory.com/28)







[Least Squares Error](https://texonom.com/least-squares-error-93b101745714452aa1656b71320e08b6)
