Consider a linear regression model, given the following hypothesis function:
In this case, the cost function for is the mean squared error (MSE).
The formula is as follows:
In this formula, represents the number of training instances. and are the input vector and the target vector for the ith training instance respectively, ...