meridian.model.calibration.roi.get_calibrated_roi_prior

Calculates the calibrated ROI prior from one or more experiment results.

This function aggregates incrementality experiment results from one or more experiments, applies spend, recency, and duration adjustments, and merges them into a single joint prior distribution. If a baseline prior is provided, its mean and variance are used to regularize the experiment results.

calibration_data A sequence of meridian.model.calibration.base.CalibrationData objects, each containing an experiment result and associated experiment information.
channel_name The name of the channel to calibrate.
total_channel_spend The total spend of the channel in the Meridian model.
last_modeled_date The last date of the modeled period in the Meridian model.
adstock_decay_function The adstock decay function used for duration adjustments ('geometric' or 'binomial').
alpha The decay rate parameter used for duration adjustments.
max_lag The maximum lag value in model intervals.
interval_days The interval size of the Meridian model time coordinates in days.
model_duration_days The number of days in the modeled period of the Meridian model.
baseline_prior An optional tfd.Distribution representing the baseline prior for the KPI. If provided, the baseline prior will regularize the incrementality experiment results.

A tuple of (calibrated_prior, calibration_output), where: - calibrated_prior: A tfd.Distribution representing the calibrated ROI prior. - calibration_output: A base.CalibrationOutput object containing output diagnostics, baseline prior, and calibrated experiments.

ValueError If any of the following are true: - No calibration data is provided for the channel. - Total channel spend is less than or equal to 0.0. - Average daily channel spend or average daily experiment spend is not positive. - The adstock decay function is invalid. - The adjusted standard error factor (tau) is less than or equal to -1.0. - Posterior evaluation results in zero or non-finite probability mass.