I am taking an online class on Machine Learning and I'm trying to fully understand how the cost function work. Can someone explain to me exactly what is going on in the function below:
Cost function $$J(\theta_0, \theta_1) = \frac{1}{2} m \sum_{i=1}^m(h_\theta(x^{(i)} - y^{(i)})^2 $$
Hypothesis function $$h_\theta(x) = \theta_0 + \theta_1 x$$
The parameters are: $\;\theta_0$ and $\theta_1$.
I want to be able to understand what is happening in the cost function, the thing I don't really understand about the cost function is the summation ($\sum$), I don't know what it means.
Can someone help me?
Thank you.