Time Series Forecasting, Bayesian Machine Learning.
median(samples) # set confidence interval for in-sample forecast credible_interval=95 alpha = (100-credible_interval)/2 upper=np.percentile(samples, [100-alpha], axis=0).reshape(-1) lower=np.percentile(samples, [alpha], axis=0).reshape(-1) print("MAPE:", MAPE(y[-18:], forecast[-18:]).round(2))