BayesianBLP.xi_as_grid#
- BayesianBLP.xi_as_grid()[source]#
Reshape the posterior
xito(region, period, inside_product).Post-hoc reshape of the flat
(market,)posterior axis to a rectangular(region, period)grid. Cheap (just a numpy view) and only valid because_preprocessenforces lexicographic(region, period)ordering on markets whentime_colis set.- Returns:
xr.DataArraywithdims(chain, draw, region, period, inside_product).
- Raises:
RuntimeErrorIf the model has not been fitted, or if
time_colwas not supplied at construction (no period coord exists).