MMMSummaryFactory.waterfall#
- MMMSummaryFactory.waterfall(hdi_probs=None, dims=None, original_scale=True, output_format=None)[source]#
Create waterfall decomposition summary DataFrame.
Summarizes per-component mean contributions (averaged over date) with mean, median, HDI bounds, and percentage of total contribution.
- Parameters:
- hdi_probssequence of
float, optional HDI probability levels (default: uses factory default)
- dims
dict, optional Dimension filters, e.g.
{"geo": ["CA"]}.- original_scalebool, default
True Whether to use original-scale contributions.
- output_format{“pandas”, “polars”}, optional
Output DataFrame format (default: uses factory default)
- hdi_probssequence of
- Returns:
pd.DataFrameorpl.DataFrameSummary DataFrame with columns:
component: Contribution component name
mean, median: Point estimates of mean per-period contributions
abs_error_{prob}_lower/upper: HDI bounds on mean contributions
pct_of_total: Mean share of total (from per-draw ratios; see share_*)
share_mean, share_median: Share point estimates with uncertainty
share_abs_error_{prob}_lower/upper: HDI bounds on share of total
<custom_dims>: One column per custom dimension when present
Notes
mean/abs_error_*describe mean per-period contributions (matchingwaterfall()bar heights).share_*andpct_of_totaldescribe each component’s share of the total per posterior draw (ratio HDIs, not derived from component-total HDIs).