Hi I am new to Linear Regression. I want to know

what is the difference b/w Gradient Descent and Mean Square Error in Linear Regression using machine learning?


When to use Gradient Descent and Mean Square Error in Linear Regression using machine learning? Or

When to use which algorithm in Linear Regression.?

Can anyone explain.?

  • 1
    $\begingroup$ Mean Square Error is a loss function not an algorithm. You don't need to choose between MSE and Gradient Descent. Did you perhaps mean to name a different algorithm (e.g. the Normal Equation)? $\endgroup$ – Neil Slater Oct 4 '18 at 7:56

To train a model, two processes have to be followed. From the predicted output, the error has to be calculated w.r.t the real output. Once the error is calculated, the weights of the model has to be changed accordingly.

Mean square error is a way of calculating the error. Depending upon the type of output, the error calculation differs. There are absolute errors, cross-entropy errors, etc. The cost function and error function are almost the same.

Gradient descent is an optimization algorithm or simply update rule, used to change the weight values. Some of the variations are Stochastic gradient descent, momentum, AdaGrad, AdaDelta, RMSprop, etc. More about Optimization algorithms

  • $\begingroup$ :- Hi Can you please tell me when to use Gradient Descent in Linear Regression..? Because their might be different algorithm .? Why only Gradient Descent.? Is their any specific reason for using Gradient Descent.? $\endgroup$ – Sanjiv Oct 4 '18 at 11:11
  • $\begingroup$ Go through the link provided. Optimization algorithms are mostly about quickly reaching the minimum point. There are multiple ways to reach it. There is no strong rule which is the best one. Basically gradient descent is obtaining the slope of the cost function and going in the negative direction, so as to minimize the cost. $\endgroup$ – yazhi Oct 4 '18 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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