Mean Squared Error (MSE) is the standard loss function used to linear regression tasks, as it effectively measures the average of the squares of the errors—that is, the average squared difference between the predicted values and the actual values.
It is defined mathematically as:
Where:
- is the number of data points
- is the actual value for the data point
- is the predicted value for the data point

Higher Dimensions
Can be generalized as:
Where the hypothesis function represents the predicted value based on the input features and model parameters .
We can then