Computational Physics, Python, Linear Algebra, Math, Mathematics.
[4.90382099, 1. ], [3.42414869, 1. ], [2.40465951, 1. ], [1.96058759, 1. ]]) We can now find the pseudo-inverse of A and calculate the coefficients of the regression line: A_plus = np.linalg.pinv(A) coefs = A_plus.dot(y) coefs array([[1.9461907 ], [1.16994745]]) We can finally draw the point and