Plots the expected versus actual outcome over time.
Args
selected_times
Optional list of a subset of time dimensions to include.
By default, all times are included. Times should match the time
dimensions from meridian.InputData.
selected_geos
Optional list of a subset of geo dimensions to include. By
default, all geos are included. Geos should match the geo dimension
names from meridian.InputData. Set either selected_geos or
n_top_largest_geos, do not set both.
n_top_largest_geos
Optional number of largest geos by population to
include. By default, all geos are included. Set either selected_geos
or n_top_largest_geos, do not set both.
show_geo_level
If True, plots at the geo-level instead of one national
level plot. Only available if selected_geos or n_top_largest_geos is
provided.
include_baseline
If True, shows the expected baseline outcome without
any media execution.
include_ci
If True, shows the credible intervals for the expected
outcome.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-05 UTC."],[],["The `ModelFit` class generates plots comparing expected versus actual outcomes from a Meridian model. It calculates these values, along with confidence intervals, over time. Key actions include initializing with a Meridian model and a confidence level, then generating the plot using `plot_model_fit`. This method allows selecting specific time periods and geographic regions, displaying the geo level, and optionally including baseline outcomes and confidence intervals. It returns an Altair plot. The confidence level can be updated through `update_confidence_level`. The `model_fit_data` attribute contains the relevant datasets.\n"]]