BayesianBLP.iterate_posterior_samples#
- BayesianBLP.iterate_posterior_samples(n_samples)[source]#
Stack
chain × drawand (optionally) subsample posterior arrays.Resolves region-level parameters at each market via the model’s
region↔marketindex, so downstream code sees per-market arrays without having to re-broadcast.- Parameters:
- Returns:
- alpha_at_market
np.ndarray Shape
(S, M).- beta_at_market
np.ndarray Shape
(S, M, K).- xi
np.ndarray Shape
(S, M, J).- sigma_random
np.ndarrayorNone Shape
(S, n_random)when the model has random coefficients;Noneotherwise.
- alpha_at_market
- Raises:
RuntimeErrorIf the model has not been fitted.