Performance speedup for updating posterior with new data

You can try modeling betas as:

betas = pm.Normal("betas", mu=np.zeros(X.shape[1]), sigma=np.ones(X.shape[1]) * 10, shape=X.shape[1])

and replace mu sigma with value computed from posterior sample for the next batch.

1 Like