Asked about Linear algebra in NumPy, by doing
How is linear regression a linear algebra problem?
An answer that works
Stack the inputs into a matrix X with a column of ones, and the targets into a vector y. The best weights minimise the squared length of Xw minus y, the least squares problem, which has a closed-form solution and is what lstsq computes.
Reading an answer is not being able to give one. The section that teaches this is Linear algebra in NumPy, by doing, 5 hours of Linear algebra.
Learn this properlyAlso asked about Linear algebra
What does a dot product tell you?Why do matrix multiply shapes have to line up?What is broadcasting and why is it risky?What is the difference between L1 and L2 regularisation?What does SVD give you?How does PCA relate to eigenvectors?What does the dot product of two vectors tell you?Explain PCA.
All 10 questions on Linear algebra