buyer_nu_posterior#

pymc_marketing.customer_choice.taste_profiles.buyer_nu_posterior(model, n_samples=300)[source]#

Posterior of the average buyer’s taste vector per market.

For each posterior sample \(s\), market \(m\), and random-coef dimension \(d\),

\[\bar\nu_{m,d}^{(s)} = \frac{\sum_r \nu_{r,d} \cdot s^{\mathrm{in}}_{m,r}(s)} {\sum_r s^{\mathrm{in}}_{m,r}(s)}\]

where \(s^{\mathrm{in}}_{m,r}\) sums the per-consumer-type inside-good probability across products.

Parameters:
modelBayesianBLP

A fitted model.

n_samplesint

Number of posterior draws to use.

Returns:
np.ndarray

Shape (n_samples, M, D). The posterior of the average buyer’s taste vector per market.