Computational Thinking, Python, Linear Algebra, Linear Regression, Jupyter Notebook.
runs, 1000 loops each) coeffs_qr = ls_qr(trn_int, y_trn) regr_metrics(y_test, test_int @ coeffs_qr) (57.94102134545711, 48.053565198516452) SVD SVD gives the pseudo-inverse def ls_svd(A,b): m, n = A.shape U, sigma, Vh = scipy.linalg.svd(A, full_matrices=False, lapack_driver='gesdd') w = (U.T @ b)/