Skip to content

Passing only free_RVs to sample_prior_predictive #1593

Open
@williambdean

Description

@williambdean

Passing only free_RVs to sample_posterior_predictive will cause errors due to logic assuming the prior_predictive group.

Should I be able to do this?

mmm = MMM(...)

mmm.sample_prior_predictive(X, var_names=["saturation_beta", "adstock_alpha"])

If not, it doesn't fail automatically which I think should be forced if that is a requirement.

Failure reasons:

Version is trying to be attached to the prior_predictive (which wouldn't be present)

prior_pred["prior_predictive"].attrs["pymc_marketing_version"] = __version__

The prior_predictive group is explicitly being extracted

prior_predictive_samples = az.extract(
prior_pred, "prior_predictive", combined=combined
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ModelBuilderRelated to the ModelBuilder class and its childrenbugSomething isn't workingrequest discussion

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions