sample_prior#

pymc_marketing.prior.sample_prior(factory, coords=None, name='var', wrap=False, **sample_prior_predictive_kwargs)[source]#

Sample the prior for an arbitrary VariableFactory.

Parameters:
factoryVariableFactory

The factory to sample from.

coordsdict[str, list[str]], optional

The coordinates for the variable, by default None. Only required if the dims are specified.

namestr, optional

The name of the variable, by default “var”.

wrapbool, optional

Whether to wrap the variable in a pm.Deterministic node, by default False.

sample_prior_predictive_kwargsdict

Additional arguments to pass to pm.sample_prior_predictive.

Returns:
xr.Dataset

The dataset of the prior samples.