There are a number of websites describing gradient descent to find the parameters for simple linear regression (here is one of them). Google also describes it in their new (to the public) ML course.
However on Wikipedia, the following formulae to calculate the parameters are supplied: $$ {\displaystyle {\begin{aligned}{\hat {\alpha }}&={\bar {y}}-{\hat {\beta }}\,{\bar {x}},\\{\hat {\beta }}&={\frac {\sum _{i=1}^{n}(x_{i}-{\bar {x}})(y_{i}-{\bar {y}})}{\sum _{i=1}^{n}(x_{i}-{\bar {x}})^{2}}}\end{aligned}}} $$
Also, the scikit-learn LinearRegression function, does not have an n_iter_
(number of iterations) attribute as it does for many other learning functions, which I suppose suggests gradient descent isn't being used?
Questions:
- Are the websites describing gradient descent for simple linear regression only doing so to teach the concept of it on the most basic ML model? Is the formula on Wikipedia what most stats software would use to calculate the parameters (at least scikit-learn does not seem to be using gradient descent)?
- What is typically used for multiple linear regression?
- For what types of statistical learning models is gradient descent typically used to find the parameters over other methods? I.e. is there some rule of thumb?