extract_response_distribution#

pymc_marketing.pytensor_utils.extract_response_distribution(pymc_model, idata, response_variable, frozen_deterministics=None)[source]#

Extract the response distribution graph, conditioned on posterior parameters.

Parameters:
pymc_modelModel

The PyMC model to extract the response distribution from.

idataInferenceData

The inference data containing posterior samples.

response_variablestr

The name of the response variable to extract.

frozen_deterministicslist of str, optional

Names of Deterministic variables to freeze at their posterior values instead of recomputing from the graph. Some models (e.g, those containing HSGP) need this to to obtain a valid conditional posterior graph.

Returns:
pt.TensorVariable

The response distribution graph.