Why are the cost function and mean squared errors called the same thing? WHEN THE COST FUNCTION IS 1/2M AND THE MSE IS 1/N. AND M=N




1 Answer 1


In completing our friend answer i can say briefly dividing the MSE or some cost functions by 2 is a common practice to simplify mathematical calculations and derivatives, but it does not fundamentally change the interpretation or relative performance of different models.

For example, when you take the derivative of the MSE loss function, dividing it by 2 simplifies the calculations and eliminates the constant term. This can be seen in optimization algorithms like gradient descent, where the derivative of the loss function is used to update the model's parameters.

  • $\begingroup$ I am just saying that there's a 2 before 'm' in the cost function whereas there's no 2 before 'n' in MSE. Then why are they called the same? I mean why do people say that MSE is COST FUNCTION. $\endgroup$ Jun 11, 2023 at 13:59
  • $\begingroup$ @RubayetAlam in following you question: MSE is an error metric and also it is similar to cost function in some algorithms as you can see and if we remove 2 from cost function then it will be exactly MSE equation form so as i said 2 in cost function does not fundamentally change the interpretation of model. because of this similarity people use them interchangeably. Remember this that The cost function is used during the training process to optimize the model's parameters, while MSE is an error metric used to evaluate the model's performance. $\endgroup$
    – Moein
    Jun 12, 2023 at 10:20
  • $\begingroup$ thank you very much, JazakAllah. $\endgroup$ Jun 22, 2023 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.