Last answered:

10 Nov 2023

Posted on:

06 May 2022

0

difference between Gradient Descent and OLS,

Please I 'd like to ask when should I use gradient descent and when should I use OLS method and what is the difference between them ?

1 answers ( 0 marked as helpful)
Posted on:

10 Nov 2023

0

OLS is preferred when a closed-form solution exists, and the dataset is not too large.

Closed-form solution - meaning that you can directly calculate the coefficients that minimize the sum of squared errors.

Gradient Descent is preferred when dealing with large datasets or high-dimensional data where the closed-form solution is computationally expensive.

Submit an answer