Bayesian linear regression with a known noise variance and a Gaussian prior has a Gaussian posterior and a Gaussian posterior predictive.
Implement:
posterior(X, y, m0, S0, sigma2): return (mN, SN) with
sequential_posterior(X, y, m0, S0, sigma2): process the rows one at a time, using the current posterior as the prior for the next row. Return (mN, SN, means) where means is an (N, D) array whose row is the posterior mean after seeing rows .predictive(X_test, mN, SN, sigma2): return (mean, var) of the posterior predictive at each test row: mean and variance .X already contains any bias column. Use np.linalg.solve or np.linalg.inv as you see fit.