Computational Thinking, Python, Linear Algebra, Linear Regression, Jupyter Notebook.
lapack_driver="gelss") 199 µs ± 228 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each) Naive Solution def ls_naive(A, b): return np.linalg.inv(A.T @ A) @ A.T @ b %timeit coeffs_naive = ls_naive(trn_int, y_trn) 45.8 µs ± 4.65 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)