DEV Community

Discussion on: A deep dive into Linear Regression (3-way implementation)

Collapse
 
bahe007 profile image
Bastian Heinlein

Very good comparison of those three methods!

However, I'd like to add a bit of context to the last method using the Pseudo Inverse.

While this is a theoretical way to describe the problem, you wouldn't want to use the inverse of a matrix to solve a linear equation, because this is in no way a numerical stable solution. Instead, it's advisable to use something like the LU- or QU-decomposition or some kind of iterative solver.