Thanks.
I ran the code and it’s been churning for about 3 hours now. To give a little more context, here is my model:
with pm.Model() as sales_model:
#define the priors mu_a = pm.Normal('mu_a', mu = 0, sd = 10) sigma_a = pm.HalfCauchy('sigma_a', 5) #mu_d = pm.Normal('mu_d', mu = 0, sd = 10) #sigma_d = pm.HalfCauchy('sigma_d', 5) alpha = pm.Normal('intercept', mu=mu_a, sd = sigma_a, shape = n_dept) beta_2 = pm.Normal('IsHoliday_T', mu = 0, sd = 20) beta_3 = pm.Normal('Week', mu = 0, sd = 20) s = pm.HalfCauchy('sd', 5) #define the likelihood mu = alpha[dept_idx] + beta_2*train['IsHoliday_True'].values + beta_3*train['Week'].values y = pm.StudentT('sales', nu = 5, mu = mu, sd = s , observed = train['Weekly_Sales'], shape = train['Weekly_Sales'].shape) trace = pm.sample(draws=5000, cores = 1, init = 'advi', progressbar=True) print(sales_model.check_test_point()) trace_plot = pm.traceplot(trace[1000:], grid=True) ppc = pm.plot_posterior(trace[1000:]) summary = pm.summary(trace) posterior = pm.trace_to_dataframe(trace)
Here is the arviz code I ran:
import arviz as az
with sales_model:data = az.from_pymc3(trace=trace, coords={'departments': dept_names}, dims={'intercept': ['departments']}) az.plot_trace(data, var_names='intercept')
Is it normal to churn for that long?