Cost function
A cost function turns the model’s errors into a single number to minimise.
Mean Squared Error (MSE) squares each error (prediction − actual) so misses do not cancel and big ones hurt more, then averages them. Lower cost = better fit.
A cost function turns the model’s errors into a single number to minimise.
Mean Squared Error (MSE) squares each error (prediction − actual) so misses do not cancel and big ones hurt more, then averages them. Lower cost = better fit.