Skip to content

Consider accepting observed in sample_posterior_prodective freeze_vars #8341

Description

@ricardoV94

Description

This would mean that observed RVs in sampled graphs should be replaced by their observed data.

If you try that now you get something like ValueError - freeze_vars ['obs'] are not present in the trace. Cannot freeze variables without stored values.

This showed up when implementing model.conditional in pymc-extras, as we want the conditional variables to depend on the observed values, to get the proper conditional posterior distribution. The natural way was to make them depend on the observed RV and then freeze the RVs during posterior_predictive, but this is exactly what's not supported.

I'm not sure though, specially with the behavior when not set, do we issue warnings on dependents? Probably not.

I'd leave this as a discussion issue until demand is more clear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions