Model Representation
- Regression problem
- Target variable to be predicted is continuous
- Classification problem
- Target variable to be predicted is discrete
Cost Function
Accuracy of the hypothesis function. Takes an average difference of all results of the hypothesis with the input/output pairs.
Squared Error Function/Mean Squared Error
$$ h_\theta(x) = \theta_0 + \theta_1x
$$
$$ J(\theta0, \theta_1) = \frac{1}{2m} \sum^{m}{i=1}{(h_\theta(x_i) - y_i)^2} $$