Computational Thinking, Python, Linear Algebra, Linear Regression, Jupyter Notebook.
need to do that by hand now: trn_int = np.c_[trn, np.ones(trn.shape[0])] test_int = np.c_[test, np.ones(test.shape[0])] Since linalg.lstsq lets us specify which LAPACK routine we want to use, lets try them all and do some timing comparisons: %timeit coef, _,_,_ = linalg.lstsq(trn_int, y_trn,