summarize_metric_distributions#

pymc_marketing.mmm.evaluation.summarize_metric_distributions(metric_distributions, hdi_prob=0.94)[source]#

Summarize metric distributions with point estimates and HDIs.

Parameters:
  • metric_distributions (dict[str, NDArray]) – Dictionary of metric distributions as returned by calculate_metric_distributions.

  • hdi_prob (float) – The probability mass of the highest density interval. Defaults to 0.94.

Return type:

dict of str to dict

Returns:

A dictionary containing summary statistics for each metric. List of summary statistics calculated for each metric:

  • mean: Mean of the metric distribution.

  • median: Median of the metric distribution.

  • std: Standard deviation of the metric distribution.

  • min: Minimum value of the metric distribution.

  • max: Maximum value of the metric distribution.

  • hdi_lower: Lower bound of the Highest Density Interval.

  • hdi_upper: Upper bound of the Highest Density Interval.