Public API

This page inventories the symbols currently exported by Epsilon. It is a support-status map for a pre-release library, not a promise that every exported symbol has the same stability level.

Support bands:

  • core: stable supported Epsilon surface.
  • bounded: supported for the documented bounded slice only.
  • compatibility: retained for migration, legacy naming, or Julia package conventions.
  • scaffolded: public because implementation exists, but broader support or API stability is still being reviewed.

Support status is the current documented scope, not a v1 API freeze.

Inventory

The table between the markers below is checked by the test suite. Every current export must appear exactly once.

Plotting exports are part of the public API, but their concrete CairoMakie methods are loaded through the optional EpsilonCairoMakieExt extension. Use using Epsilon, CairoMakie before calling plotting functions or write_plot_bundle(run).

<!– BEGIN PUBLIC API INVENTORY –> | Symbol | Domain | Support | |–-|–-|–-| | AbstractMMMModel | Model core | scaffolded | | AbstractModel | Model core | scaffolded | | AbstractRegressionModel | Model core | scaffolded | | AbstractScenarioSpec | Scenario planning | bounded | | AdstockCurveResults | Post-model results | core | | After | Event windows | scaffolded | | Before | Event windows | scaffolded | | BudgetOptimizationResult | Budget optimization | scaffolded | | CalibrationStepConfig | Calibration | scaffolded | | ContributionResults | Post-model results | core | | ConvMode | Transforms | core | | ConvergenceIssue | Diagnostics | scaffolded | | ConvergenceReport | Diagnostics | scaffolded | | ConvergenceWarning | Diagnostics | scaffolded | | ConvergenceWarnings | Diagnostics | scaffolded | | CostPerTargetCalibrationPayload | Calibration | scaffolded | | CostPerTargetCalibrationRows | Calibration | scaffolded | | CurrentScenarioSpec | Scenario planning | bounded | | DecompositionResults | Post-model results | core | | EpsilonPrior | Priors and distributions | scaffolded | | FinnishHorseshoePrior | Priors and distributions | scaffolded | | FixedBudgetOptimizedScenarioSpec | Scenario planning | bounded | | HorseshoePrior | Priors and distributions | scaffolded | | InferenceResults | Inference | scaffolded | | InferenceSampleStats | Inference | scaffolded | | LaplacePrior | Priors and distributions | scaffolded | | LiftTestCalibrationPayload | Calibration | scaffolded | | LiftTestCalibrationRows | Calibration | scaffolded | | LogNormalPrior | Priors and distributions | scaffolded | | MMMCalibrationSpec | Calibration | scaffolded | | MMMData | Model data | scaffolded | | MMMModelSpec | Model specification | scaffolded | | ManualAllocationScenarioSpec | Scenario planning | bounded | | ManualScenarioEvaluationResult | Scenario planning | bounded | | MaskedPrior | Priors and distributions | scaffolded | | MaxAbsScaleChannels | Transforms | core | | MaxAbsScaleTarget | Transforms | core | | MaxAbsScaler | Transforms | core | | MetricResults | Post-model results | core | | ModelArtifactMetadata | Model artifacts | scaffolded | | ModelConfig | Configuration | scaffolded | | ModelConfigError | Configuration | scaffolded | | ModelCoordinateMetadata | Model artifacts | scaffolded | | ModelDiagnostics | Diagnostics | scaffolded | | ModelFitState | Model lifecycle | scaffolded | | ModelResults | Model lifecycle | scaffolded | | NonMonotonicError | Calibration | scaffolded | | Overlap | Event windows | scaffolded | | PanelAxis | Panel metadata | bounded | | PanelBudgetOptimizationResult | Budget optimization | bounded | | PanelCoordinate | Panel metadata | bounded | | PanelMMM | Model core | bounded | | PanelMMMData | Model data | bounded | | ParameterDiagnostics | Diagnostics | scaffolded | | PipelineRunConfig | Pipeline | scaffolded | | PipelineRunResult | Pipeline | scaffolded | | PipelineStageRecord | Pipeline | scaffolded | | PipelineValidationResult | Pipeline | scaffolded | | R2D2Prior | Priors and distributions | scaffolded | | ResponseCurveResults | Post-model results | core | | SamplerConfig | Inference | scaffolded | | SamplerDiagnostics | Diagnostics | scaffolded | | SamplerWarning | Diagnostics | scaffolded | | SamplerWarnings | Diagnostics | scaffolded | | SaturationCurveResults | Post-model results | core | | Scaled | Transforms | core | | ScenarioDataArraySpec | Scenario planning | bounded | | ScenarioPlanResult | Scenario planning | bounded | | ScenarioStoreArtifact | Scenario planning | bounded | | SkewStudentT | Priors and distributions | scaffolded | | StandardScaler | Transforms | core | | StandardizeControls | Transforms | core | | TimeSeriesCalibrationInput | Calibration | scaffolded | | TimeSeriesMMM | Model core | bounded | | TimeVaryingMediaConfig | Configuration | bounded | | UnalignedValuesError | Calibration | scaffolded | | WeibullType | Transforms | core | | active_count | Priors and distributions | scaffolded | | adstock_curve_plot | Plotting | bounded | | adstock_curve_results | Post-model results | core | | assert_monotonic_lift | Calibration | scaffolded | | assert_scenario_store_compatible | Scenario planning | bounded | | batched_convolution | Transforms | core | | binomial_adstock | Transforms | core | | budget_audit_table | Budget optimization | scaffolded | | budget_impact_table | Budget optimization | scaffolded | | budget_optimization_plot | Plotting | bounded | | build_cost_per_target_calibration_payload | Calibration | scaffolded | | build_lift_test_calibration_payload | Calibration | scaffolded | | build_model | Model builders | scaffolded | | centered_logistic_saturation | Transforms | bounded | | contribution_area_plot | Plotting | bounded | | contribution_plot | Plotting | bounded | | contribution_results | Post-model results | core | | convergence_report | Diagnostics | scaffolded | | convergence_warnings | Diagnostics | scaffolded | | cost_per_target_penalties | Calibration | scaffolded | | cost_per_target_total_penalty | Calibration | scaffolded | | decomposition_plot | Plotting | bounded | | decomposition_results | Post-model results | core | | delayed_adstock | Transforms | core | | deserialize_model_config | Serialization | scaffolded | | deserialize_prior | Priors and distributions | scaffolded | | epsilon_theme | Plotting | bounded | | epsilon_version | Package identity | compatibility | | evaluate_manual_scenario | Scenario planning | bounded | | exact_row_indices | Calibration | scaffolded | | expand_masked_values | Priors and distributions | scaffolded | | finnish_horseshoe_coefficients | Priors and distributions | scaffolded | | fit! | Model lifecycle | scaffolded | | fit_transform! | Transforms | core | | fourier_features | Seasonality | scaffolded | | gamma_shape_scale | Calibration | scaffolded | | geometric_adstock | Transforms | core | | has_convergence_issues | Diagnostics | scaffolded | | has_convergence_warnings | Diagnostics | scaffolded | | has_numerical_errors | Diagnostics | scaffolded | | has_sampler_warnings | Diagnostics | scaffolded | | hill_function | Transforms | core | | horseshoe_coefficients | Priors and distributions | scaffolded | | inference_results | Inference | scaffolded | | instantiate_distribution | Priors and distributions | scaffolded | | inverse_transform | Transforms | core | | lift_test_estimated_lift | Calibration | scaffolded | | lift_test_estimated_lift_ad | Calibration | scaffolded | | lift_test_gamma_distribution | Calibration | scaffolded | | lift_test_likelihood_terms | Calibration | scaffolded | | lift_test_log_density | Calibration | scaffolded | | lift_test_payload_log_density | Calibration | scaffolded | | load_inference_results | Serialization | scaffolded | | load_model | Serialization | scaffolded | | load_model_config | Configuration | scaffolded | | load_public_config | Configuration | scaffolded | | load_results | Serialization | scaffolded | | load_sampler_config | Inference | scaffolded | | load_scenario_store | Scenario planning | bounded | | logistic_saturation | Transforms | compatibility | | max_abs_scale_channel_data | Transforms | core | | max_abs_scale_target_data | Transforms | core | | metric_results | Post-model results | core | | michaelis_menten | Transforms | core | | model_config_from_dict | Configuration | scaffolded | | model_diagnostics | Diagnostics | scaffolded | | model_results | Model lifecycle | scaffolded | | nobs | Model data | compatibility | | normalize_channel_columns | Model data | scaffolded | | npanel_observations | Model data | bounded | | npanels | Model data | bounded | | ntime | Model data | bounded | | observed_fitted_plot | Plotting | bounded | | optimize_budget | Budget optimization | scaffolded | | panel_axes | Panel metadata | bounded | | panel_axis | Panel metadata | bounded | | panel_coordinate | Panel metadata | bounded | | panel_coordinates | Panel metadata | bounded | | pipeline_main | Pipeline | scaffolded | | posterior_density_plot | Plotting | bounded | | predict | Model lifecycle | scaffolded | | prior_posterior_plot | Plotting | bounded | | prior_predict | Model lifecycle | scaffolded | | r2d2_coefficients | Priors and distributions | scaffolded | | r2d2_variance_weights | Priors and distributions | scaffolded | | regularized_local_scales | Priors and distributions | scaffolded | | residual_diagnostics_plot | Plotting | bounded | | response_curve_plot | Plotting | bounded | | response_curve_results | Post-model results | core | | run_pipeline | Pipeline | scaffolded | | sampler_config_from_dict | Inference | scaffolded | | sampler_diagnostics | Diagnostics | scaffolded | | sampler_warnings | Diagnostics | scaffolded | | saturation_curve_plot | Plotting | bounded | | saturation_curve_results | Post-model results | core | | save_inference_results | Serialization | scaffolded | | save_model | Serialization | scaffolded | | save_results | Serialization | scaffolded | | scale_channel_lift_measurements | Calibration | scaffolded | | scale_lift_measurements | Calibration | scaffolded | | scale_target_for_lift_measurements | Calibration | scaffolded | | scenario_plan | Scenario planning | bounded | | scenario_store_plan | Scenario planning | bounded | | standardize_control_data | Transforms | core | | summary_table | Post-model results | bounded | | tanh_saturation | Transforms | core | | trace_plot | Plotting | bounded | | transform | Transforms | core | | validate_calibration_step_config | Calibration | scaffolded | | validate_channel_values | Validation | bounded | | validate_column_indices | Validation | scaffolded | | validate_cost_per_target_calibration_payload | Calibration | scaffolded | | validate_lift_test_calibration_payload | Calibration | scaffolded | | validate_lift_test_columns | Calibration | scaffolded | | validate_mmm_data | Model data | scaffolded | | validate_model_config | Configuration | scaffolded | | validate_panel_mmm_data | Model data | bounded | | validate_sampler_config | Inference | scaffolded | | validate_target_data | Model data | scaffolded | | weibull_adstock | Transforms | core | | write_plot_bundle | Plotting | bounded | | write_scenario_store | Scenario planning | bounded | <!– END PUBLIC API INVENTORY –>

Reading The Table

Several domains are intentionally still scaffolded. That label means the symbol is exported today and has implementation behind it, but the API may still change before a stable release.

Panel, calibration, scenario-planner, pipeline, optimization, inference, and configuration entries should be read with the scope limits documented in Support Boundaries.

Docstring Reference

Epsilon.AdstockCurveResultsType
AdstockCurveResults

Typed draw-level adstock-only surface for one media channel derived from grouped InferenceResults.

For time-series models, values has dimensions (draw, spend_point). For bounded panel replay, values has dimensions (draw, panel, spend_point) and uses the same shared historical-scaling delta grid as ResponseCurveResults. The panel spend_grid axis order is always (panel, spend_point).

source
Epsilon.BudgetOptimizationResultType
BudgetOptimizationResult

Typed canonical result surface for the public Phase 8 optimizer.

This typed artifact preserves the bounded optimizer output without exposing solver-specific details in the public API. current_spend, optimized_spend, and nested constraint audit spend values are reported in the same original channel units and time aggregation level as the fitted input data.

source
Epsilon.CalibrationStepConfigType
CalibrationStepConfig(; method, params=Dict())

Typed mirror of the Abacus public YAML calibration step schema (abacus/mmm/builders/schema.py::CalibrationStepConfig): one step is a method name drawn from the supported calibration methods plus a free-form params mapping. params.dist is rejected, matching Abacus's current YAML restriction that custom likelihood distributions cannot be configured through YAML.

Applying a configured step to a model is a separate, not-yet-implemented model-integration concern.

source
Epsilon.ContributionResultsType
ContributionResults

Typed draw-level additive contribution surface derived from grouped InferenceResults.

For time-series models, values has dimensions (draw, observation, component). For bounded panel replay, values has dimensions (draw, time, panel, component), where multidimensional panels are represented on the deterministic flat panel-cell axis. Panel summaries always expose the fixed panel_cell axis plus the declared coordinate columns carried by ModelCoordinateMetadata.panel_axes.

source
Epsilon.CostPerTargetCalibrationPayloadType
CostPerTargetCalibrationPayload(gathered_cpt, targets, sigma)

Typed, already-scaled cost-per-target calibration observations ready for the model runtime, matching Abacus's explicit gathered/target/sigma soft-penalty semantics: gathered_cpt is the observed (gathered) cost-per-target value, targets is the target cost-per-target value, and sigma is the strictly positive soft-penalty scale, all in scaled model space.

Use build_cost_per_target_calibration_payload to construct one of these from plain columnar input plus a fitted target scaler; this struct's own positional constructor performs no scaling and should generally not be called directly outside tests.

source
Epsilon.CostPerTargetCalibrationRowsType
CostPerTargetCalibrationRows(gathered_cpt, targets, sigma)

Plain, unscaled columnar cost-per-target row data supplied by a caller, in the model's original (unscaled) units. This is the raw companion input accepted by TimeSeriesMMM's calibration constructor arguments; it is resolved into a scaled CostPerTargetCalibrationPayload internally once the fitted target scale is known.

Use the keyword constructor to build one of these from plain vectors; it validates matching lengths, finite gathered_cpt/targets, and positive sigma eagerly.

source
Epsilon.CurrentScenarioSpecType
CurrentScenarioSpec(; name, start_date=nothing, end_date=nothing, scenario_id=nothing)

Describe the baseline/current scenario in a non-UI scenario-planner comparison.

Dates may be Date, ISO date strings, or nothing. When scenario_id is not provided it is deterministically slugified from name, matching Abacus's scenario-store convention.

source
Epsilon.DecompositionResultsType
DecompositionResults

Typed draw-level additive decomposition surface derived from ContributionResults.

totals and shares are two-dimensional arrays with dimensions (draw, component). Time-series and panel decomposition artifacts intentionally share this axis order because panel contributions are aggregated over time and flat panel cells before component shares are computed.

source
Epsilon.EpsilonPriorType
EpsilonPrior(distribution; dims=nothing, centered=true, transform=nothing, kwargs...)

Store a config-defined prior specification in a Julia-native form.

source
Epsilon.FinnishHorseshoePriorType
FinnishHorseshoePrior(; scale=1.0, slab_scale=2.5, slab_df=4.0, dims=nothing, centered=true)

Regularized horseshoe prior recipe with finite slab control. scale, slab_scale, and slab_df are stored on the typed prior so the later model layer can build the full regularized horseshoe hierarchy. The deterministic helper functions in this file use only scale and slab_scale; slab_df remains model-layer metadata.

source
Epsilon.FixedBudgetOptimizedScenarioSpecType
FixedBudgetOptimizedScenarioSpec(; name, total_budget, ...)

Describe an optimized fixed-budget scenario for comparison/reporting.

The actual allocation is supplied by an existing BudgetOptimizationResult or PanelBudgetOptimizationResult passed to scenario_plan. The spec preserves planner metadata such as the requested budget, response variable, and optional constraint dictionaries without re-solving the optimization problem. total_budget and any spend-like constraint dictionaries must use the same original channel units and time aggregation level as the fitted model data and optimizer result.

source
Epsilon.HorseshoePriorType
HorseshoePrior(; scale=1.0, dims=nothing, centered=true)

Global-local shrinkage prior recipe for sparse coefficients.

source
Epsilon.InferenceResultsType
InferenceResults(metadata, spec; posterior=nothing, prior=nothing, posterior_predictive=nothing, prior_predictive=nothing, sample_stats=InferenceSampleStats(), observed_data=nothing)

Canonical grouped inference-artifact surface for fitted MMM models.

ModelResults remains the lighter flat convenience container. InferenceResults is the richer grouped surface that preserves posterior draws, optional prior draws, predictive draws, sampler statistics, observed data, and coordinate metadata together.

source
Epsilon.InferenceSampleStatsType
InferenceSampleStats(; internals=nothing, diagnostics=nothing, sampler_diagnostics=nothing, sampler_warnings=nothing, convergence_report=nothing, convergence_warnings=nothing)

Typed grouped sample-statistics bundle for the canonical InferenceResults surface.

source
Epsilon.LaplacePriorType
LaplacePrior(; mu, b, dims=nothing, centered=true)

Laplace prior with optional non-centered bookkeeping metadata.

source
Epsilon.LiftTestCalibrationPayloadType
LiftTestCalibrationPayload(channel_index, x, delta_x, delta_y, sigma)

Typed, row-aligned, already-scaled lift-test calibration observations ready for the model runtime. channel_index is the 1-based index into the model's channel axis for each row; x, delta_x, delta_y, and sigma are all in scaled model space (the same space as the fitted media and target likelihood). sigma must be strictly positive.

Use build_lift_test_calibration_payload to construct one of these from plain columnar lift-test input plus fitted channel/target scalers; this struct's own positional constructor performs no scaling or alignment and should generally not be called directly outside tests.

source
Epsilon.LiftTestCalibrationRowsType
LiftTestCalibrationRows(channel, x, delta_x, delta_y, sigma)

Plain, unscaled columnar lift-test row data supplied by a caller, in the model's original (unscaled) units. This is the raw companion input accepted by TimeSeriesMMM's calibration constructor arguments; it is resolved into a scaled LiftTestCalibrationPayload internally once the fitted channel/target scales are known.

Use the keyword constructor to build one of these from plain vectors; it validates matching lengths, finite x/delta_x/delta_y, positive sigma, and lift-test monotonicity via assert_monotonic_lift eagerly, so malformed calibration data fails at TimeSeriesMMM construction time rather than at fit time.

source
Epsilon.LogNormalPriorType
LogNormalPrior(; mean, std, dims=nothing, centered=true)
LogNormalPrior(; mu, sigma, dims=nothing, centered=true)

Log-normal prior parameterized by positive-scale mean and standard deviation.

source
Epsilon.MMMDataType
MMMData(; dates, target, channels, channel_names, controls=nothing, control_names=String[], events=nothing, event_names=String[])

Typed container for the arrays that define one MMM training dataset.

target and channels are stored in the caller's original measurement units. Downstream spend-like arguments, including optimizer total_budget and bounds, must use the same channel units and time aggregation level.

source
Epsilon.MMMModelSpecType
MMMModelSpec

Resolved model-building payload before a sampling backend is attached, including coordinate metadata for the current typed model surface.

For time-series models channel_scale is a channel vector and target_scale is a scalar. For panel models channel_scale is a channel-by-flattened-panel matrix and target_scale is a flattened-panel vector. For panel specs, nobs currently stores flattened panel-cell observations to preserve artifact contracts; use ntime(data) and npanels(data) at the data boundary when the shared time and flat panel axes must remain separate.

source
Epsilon.ManualAllocationScenarioSpecType
ManualAllocationScenarioSpec(; name, allocation, start_date=nothing, end_date=nothing, scenario_id=nothing)

Describe a manually specified channel-allocation scenario.

allocation may be a dictionary mapping channel names to nonnegative spend, or a one-dimensional ScenarioDataArraySpec whose only dimension is channel. This type records validated planner intent; it does not fit or optimize a model by itself. Allocation values must use the same original channel units and time aggregation level as the fitted model data and response surfaces.

source
Epsilon.ManualScenarioEvaluationResultType
ManualScenarioEvaluationResult

Typed result returned by evaluate_manual_scenario.

The result compares observed/current spend against one evaluated ManualAllocationScenarioSpec. Manual evaluation is bounded to time-series grouped InferenceResults and reuses the same response-surface interpolation machinery as optimize_budget; it does not refit a model, run a new optimizer, simulate a future spend path, or evaluate panel allocation semantics.

current_spend and manual_spend are reported in the same original channel units and time aggregation level as the fitted model data.

source
Epsilon.MaskedPriorType
MaskedPrior(prior, mask; mask_dims=prior.dims, active_dim=nothing)

Represent a prior defined only on the active entries of a boolean mask.

source
Epsilon.MetricResultsType
MetricResults

Typed draw-level marketing-metric surface derived from ResponseCurveResults.

For time-series curves, values has dimensions (draw, spend_point, metric). For bounded panel curves, values has dimensions (draw, panel, spend_point, metric). Panel metrics inherit the response-curve spend_grid axis order: (panel, spend_point).

source
Epsilon.ModelConfigType
ModelConfig(; ...)

Typed MMM model configuration assembled from dict or YAML input.

target_type currently supports only "revenue" and "conversion".

source
Epsilon.ModelFitStateType
ModelFitState(status, backend; artifact=nothing, message="")

Track the current fit lifecycle state for a model object.

source
Epsilon.ModelResultsType
ModelResults(metadata, spec, chain; posterior_predictive=nothing, prior_predictive=nothing)

Typed flat fitted-results container for the current MMM model path.

ModelResults remains the lighter convenience surface. For the richer grouped artifact introduced in Phase 6, use InferenceResults via inference_results(model; ...).

source
Epsilon.PanelAxisType
PanelAxis

Ordered metadata for one flattened panel-cell axis.

name is the analyst-facing flat panel-cell column name, currently "panel_cell". values stores the flat panel-cell labels in model order, and coordinate_columns stores declared panel-dimension coordinate columns in the same order as ModelCoordinateMetadata.panel_dims.

source
Epsilon.PanelBudgetOptimizationResultType
PanelBudgetOptimizationResult

Typed canonical result surface for panel budget optimization.

Panel optimization preserves the Stage 60 panel response-curve contract by optimizing channel-level budget totals and applying each channel's historical panel-cell spend shares to the optimized total. The result therefore exposes the same channel-level allocation fields as BudgetOptimizationResult plus panel-cell audit matrices for downstream reporting.

Channel-level and panel-cell spend fields use the same original channel units and time aggregation level as the fitted PanelMMMData channels. Historical panel shares distribute those channel totals; they do not perform currency, calendar aggregation, or unit conversion.

source
Epsilon.PanelCoordinateType
PanelCoordinate

Named coordinate mapping for one flattened panel-cell index.

flat_index is the one-based index used on Epsilon's internal flat panel axis, panel_name is the corresponding flat panel label, and values stores the declared panel-dimension coordinates as a NamedTuple, for example (geo = "UK", brand = "Alpha").

source
Epsilon.PanelMMMType
PanelMMM(config, sampler_config, data)

Container for the bounded panel MMM path, with a shared time axis and one or more declared panel dimensions represented internally by a flattened panel-cell axis.

source
Epsilon.PanelMMMDataType
PanelMMMData(; dates, target, channels, panel_names, channel_names, panel_coordinates=Dict())

Typed container for a bounded panel MMM dataset with a shared time axis.

target is stored as (time, panel) and channels as (time, channel, panel). For multi-dimensional panel configs, panel is the deterministic flattened panel-cell axis and panel_coordinates can carry the original coordinate value for each declared panel dimension. Use ntime, npanels, and npanel_observations when code needs to distinguish the shared time axis from flattened panel-cell observations.

target and channels are stored in the caller's original measurement units. Downstream spend-like arguments, including optimizer total_budget and bounds, must use the same channel units and time aggregation level.

source
Epsilon.PipelineRunConfigType
PipelineRunConfig(; config_path, output_dir="results", run_name=nothing, dataset_path=nothing, prior_samples=20, curve_points=100, draws=nothing, tune=nothing, chains=nothing, cores=nothing, random_seed=nothing)

Bounded runtime configuration for the Phase 9 pipeline runner.

PipelineRunConfig owns the CLI/API override surface that may be merged onto a YAML pipeline config at runtime without widening the underlying MMM contract. The closed Phase 9 runtime contract freezes the keyword shape, runner-only YAML stripping, and bounded stage-execution override surface without widening the underlying MMM API.

source
Epsilon.PipelineRunResultType
PipelineRunResult(run_name, run_dir, manifest_path; status=:pending, config_path, started_at_utc, finished_at_utc=nothing, stage_records=PipelineStageRecord[], warnings=String[], error=nothing)

Typed run-level summary for the bounded Phase 9 pipeline runner.

PipelineRunResult is the canonical Julia-native summary of one bounded Phase 9 pipeline execution, including stage status, artifact ownership, warnings, and failure metadata.

source
Epsilon.PipelineStageRecordType
PipelineStageRecord(key, directory; status=:pending, started_at_utc=nothing, finished_at_utc=nothing, artifact_paths=Dict(), warnings=String[], error=nothing)

Typed per-stage manifest record for the bounded Phase 9 pipeline runner.

source
Epsilon.PipelineValidationResultType
PipelineValidationResult(; holdout_rows, train_date_start, train_date_end, holdout_date_start, holdout_date_end, observed, fitted_mean, residuals, metrics)

Typed blocked-holdout artifact surface reserved for Phase 9 validation stage outputs.

source
Epsilon.R2D2PriorType
R2D2Prior(; mean_R2=0.5, concentration=1.0, scale=1.0, dims=nothing, centered=true)

R2D2 shrinkage prior recipe using variance allocation weights. mean_R2, concentration, and scale are stored on the typed prior so the later model layer can build the full R2D2 hierarchy. The deterministic helper functions in this file consume scale once phi and tau2 are already given; mean_R2 and concentration remain model-layer metadata.

source
Epsilon.ResponseCurveResultsType
ResponseCurveResults

Typed draw-level counterfactual response surface for one media channel derived from grouped InferenceResults.

For time-series models, values has dimensions (draw, spend_point) and stores total channel contribution in observed target units for each requested total-spend point. For bounded panel replay, values has dimensions (draw, panel, spend_point); the spend grid is a panel-by-spend-point matrix generated from a shared historical-scaling delta_grid. The delta_grid values are historical spend multipliers, not absolute spend values.

source
Epsilon.SamplerConfigType
SamplerConfig(; draws=1000, tune=1000, chains=4, cores=chains, target_accept=0.8, random_seed=nothing, progressbar=true, compute_convergence_checks=true)

Typed sampler settings for model fitting.

source
Epsilon.SaturationCurveResultsType
SaturationCurveResults

Typed draw-level saturation-only surface for one media channel derived from grouped InferenceResults.

For time-series models, values has dimensions (draw, spend_point). For bounded panel replay, values has dimensions (draw, panel, spend_point) and uses the same shared historical-scaling delta grid as ResponseCurveResults. The panel spend_grid axis order is always (panel, spend_point).

source
Epsilon.ScaledType
Scaled(base, scale)

Continuous distribution obtained by scaling draws from base by a positive constant scale.

source
Epsilon.ScenarioDataArraySpecType
ScenarioDataArraySpec(values; dims, coords)

Dimension-labelled numeric scenario input used by the bounded non-UI scenario planner surface.

The v1 planner accepts this type for channel-level manual allocations when the spec has exactly one channel dimension. Richer multi-dimensional allocation execution is intentionally deferred until the response-curve contract supports that policy directly. Allocation values must use the same original channel units and time aggregation level as the fitted model data and response surfaces.

source
Epsilon.ScenarioPlanResultType
ScenarioPlanResult

Abacus-like non-UI scenario comparison tables derived from a solved Epsilon budget optimization result.

totals, channels, allocations, and metadata mirror the reusable business-planning store shape from Abacus. channel_panel_allocations is empty for time-series results and populated for bounded panel historical-share optimization results.

Spend and allocation table columns are copied from existing optimizer or manual evaluation artifacts and remain in the fitted model's original channel units and time aggregation level.

source
Epsilon.SkewStudentTType
SkewStudentT(; nu, mu=0, sigma=1, alpha=0)

Skew-Student-t distribution using the Azzalini-Capitanio parameterization. When alpha == 0, this reduces to a location-scale Student-t distribution.

source
Epsilon.TimeSeriesCalibrationInputType
TimeSeriesCalibrationInput(steps, lift_test, cost_per_target)

Companion internal payload attached to a TimeSeriesMMM, bundling the raw (unscaled) calibration steps and row data supplied at construction time. Build one of these indirectly through TimeSeriesMMM's calibration_steps, lift_test_data, and cost_per_target_data constructor arguments rather than calling this constructor directly.

source
Epsilon.TimeSeriesMMMType
TimeSeriesMMM(config, sampler_config, data)

Container that ties together typed config, sampler settings, and one MMM dataset for the base time-series model path.

source
Epsilon.TimeVaryingMediaConfigType
TimeVaryingMediaConfig(; m, L, time_resolution, covariance=:expquad, eta_prior, lengthscale_prior)

Programmatic-only configuration for the bounded time-series shared media HSGP multiplier. m, L, and lengthscale_prior are measured in integer cadence-index units, while time_resolution is measured in days. Only scalar, dimensionless Exponential, Gamma, HalfNormal, and LogNormal EpsilonPrior values are accepted for the positive HSGP priors.

This bounded configuration enables a shared, strictly positive, mean-one HSGP multiplier for programmatic TimeSeriesMMM MCMC fitting and prediction only. YAML/pipeline configuration, panels, VI, calibration, Michaelis-Menten, channel-specific, intercept, multidimensional, periodic HSGP, TVP, and HSGP postmodel calculation routes remain unsupported.

source
Epsilon.UnalignedValuesErrorType
UnalignedValuesError(unaligned_values)

Raised by exact_row_indices when one or more rows of calibration data cannot be exactly matched to a single coordinate value, mirroring Abacus abacus.mmm.calibration.alignment.UnalignedValuesError. unaligned_values maps each affected column name to the 1-based row indices that failed to align.

source
Epsilon.adstock_curve_plotMethod
adstock_curve_plot(results::AdstockCurveResults)

Render the bounded adstock-only curve surface from AdstockCurveResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.adstock_curve_resultsMethod
adstock_curve_results(results::InferenceResults; channel, grid=nothing, delta_grid=nothing)

Compute a draw-level adstock-only curve for one supported media channel from grouped InferenceResults.

For time-series results, grid uses the same original-unit total-spend contract as the other Stage 60 curve families. For panel results, pass delta_grid to apply the same panel-cell historical-scaling contract as response_curve_results. The replay path bypasses saturation and downstream target coefficienting. Returned values stay in original channel-spend-equivalent units.

source
Epsilon.assert_monotonic_liftMethod
assert_monotonic_lift(delta_x, delta_y)

Require that delta_x and delta_y agree in sign (or are zero) elementwise, mirroring Abacus abacus.mmm.calibration.alignment.assert_monotonic. Throws NonMonotonicError otherwise.

source
Epsilon.assert_scenario_store_compatibleMethod
assert_scenario_store_compatible(lhs, rhs)

Reject scenario stores that cannot be compared under the same model, coordinate, objective, channel-order, and current-baseline contract.

source
Epsilon.batched_convolutionFunction
batched_convolution(x, w, axis=1, mode=After)

Apply a 1D convolution across axis while broadcasting any leading batch dimensions in w against the non-convolved dimensions of x.

mode controls boundary handling:

  • After: trailing carryover
  • Before: leading carryover
  • Overlap: parity-preserving overlap orientation. With source index t + ((lag_length - 1) ÷ 2) - lag + 1, an impulse at index 3 with weights [10, 20, 30] returns [0, 10, 20, 30, 0]; with weights [10, 20, 30, 40] it returns [0, 10, 20, 30, 40]. The even-length case preserves Epsilon's reference-locked orientation, not the opposite half-sample shift.
source
Epsilon.binomial_adstockFunction
binomial_adstock(x, alpha=0.5, l_max=12; normalize=false, axis=1, mode=After)

Apply binomial adstock along axis.

alpha may be a scalar or a batch-shaped array that broadcasts against the non-convolved dimensions of x, and must satisfy 0 < alpha <= 1.

For zero-based lag l = 0, ..., l_max - 1, the unnormalized lag weight is w_l = (1 - l / (l_max + 1))^(1 / alpha - 1). When normalize=true, Epsilon normalizes those lag weights after constructing the kernel.

source
Epsilon.budget_audit_tableMethod
budget_audit_table(result::BudgetOptimizationResult)

Project the normalized bounded optimization constraints plus the solved spend allocation into an analyst-facing audit table.

The returned DataFrame covers only the optimized channel subset because the bounded Phase 8 constraint contract applies there; held channels are exposed through budget_impact_table(result) and remain fixed at observed spend.

source
Epsilon.budget_impact_tableMethod
budget_impact_table(result::BudgetOptimizationResult)

Project a bounded optimization result into a channel-level current-versus- optimized spend comparison table.

The returned DataFrame spans all modeled channels in canonical model-spec order. Optimized channels show the solver-backed spend change, while fixed channels remain unchanged so the comparison surface stays truthful for subset optimization runs.

source
Epsilon.budget_optimization_plotMethod
budget_optimization_plot(result)

Render a bounded current-versus-optimized budget comparison figure from a budget optimization result.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.build_modelMethod
build_model(model)

Resolve one typed MMM object into a backend-agnostic model specification that the later Turing model layer can consume.

source
Epsilon.centered_logistic_saturationFunction
centered_logistic_saturation(x, lam=0.5)

Apply centered logistic saturation elementwise.

This curve is 2 / (1 + exp(-lam * x)) - 1, computed as the numerically stable equivalent tanh(lam * x / 2). It maps zero input to zero output and approaches one for large nonnegative input.

x is interpreted as media spend or exposure and must be nonnegative. Use tanh_saturation only when a signed low-level transform is required.

lam may be a scalar or an array that broadcasts against x.

source
Epsilon.contribution_area_plotMethod
contribution_area_plot(results::ContributionResults; channels=nothing)

Render a stacked additive contribution breakdown through time from ContributionResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.contribution_plotMethod
contribution_plot(results::ContributionResults; channels=nothing)

Render HDI-aware time-series media contribution plots from a bounded ContributionResults surface.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.contribution_resultsMethod
contribution_results(results::InferenceResults)

Compute draw-level additive contributions from grouped InferenceResults.

The returned ContributionResults surface preserves canonical draw-level values. Time-series results use dimensions (draw, observation, component); bounded panel results use (draw, time, panel, component), where multidimensional panels are represented on the deterministic flat panel-cell axis carried by the model spec.

source
Epsilon.convergence_reportMethod
convergence_report(results; rhat_threshold=1.05, ess_threshold=100.0)
convergence_report(model; rhat_threshold=1.05, ess_threshold=100.0)

Build a typed threshold-based convergence report from fitted model results or a fitted model.

source
Epsilon.convergence_warningsMethod
convergence_warnings(report)
convergence_warnings(results; rhat_threshold=1.05, ess_threshold=100.0)
convergence_warnings(model; rhat_threshold=1.05, ess_threshold=100.0)

Build typed user-facing warnings from a convergence report, fitted results, or fitted model.

source
Epsilon.cost_per_target_penaltiesMethod
cost_per_target_penalties(gathered_cpt, targets, sigma)

Compute the Abacus cost-per-target Gaussian soft-penalty term elementwise, -(|gathered_cpt - targets|)^2 / (2 * sigma^2), mirroring abacus.mmm.calibration.graph.add_cost_per_target_potentials.

source
Epsilon.decomposition_plotMethod
decomposition_plot(results::DecompositionResults)

Render a bounded decomposition figure in observed target units from DecompositionResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.decomposition_resultsMethod
decomposition_results(results::InferenceResults)

Aggregate time-indexed additive contributions into draw-level component totals and shares.

The returned DecompositionResults surface preserves canonical draw-level component totals and shares with dimensions (draw, component) for bounded time-series and panel contribution surfaces.

source
Epsilon.delayed_adstockFunction
delayed_adstock(x, alpha=0.0, theta=0, l_max=12; normalize=false, axis=1, mode=After)

Apply delayed adstock along axis.

alpha and theta may be scalars or batch-shaped arrays that broadcast against the non-convolved dimensions of x.

source
Epsilon.deserialize_model_configMethod
deserialize_model_config(model_config; non_distributions=())

Walk a model configuration dictionary and convert prior-like mappings into EpsilonPrior values. Non-prior entries are preserved.

source
Epsilon.deserialize_priorMethod
deserialize_prior(value)

Deserialize a dictionary-based prior specification into an EpsilonPrior. Supports both distribution: ... and legacy dist / kwargs shapes.

source
Epsilon.epsilon_themeMethod
epsilon_theme()

Return the optional CairoMakie-backed Epsilon plotting theme.

Plotting is an optional extension. Load CairoMakie alongside Epsilon before calling plotting APIs:

using Epsilon, CairoMakie
source
Epsilon.evaluate_manual_scenarioMethod
evaluate_manual_scenario(results, scenario; objective=:total_response, grid=nothing)

Evaluate one manually specified channel allocation against existing fitted time-series response surfaces.

results must be grouped time-series InferenceResults. The supplied ManualAllocationScenarioSpec may allocate all channels or a subset of channels; omitted channels are held at observed spend. The function computes a deterministic posterior-mean response comparison using the same bounded response-surface interpolation path as optimize_budget. It does not refit the model, solve an optimization problem, simulate future spend paths, or support panel manual allocation.

source
Epsilon.exact_row_indicesMethod
exact_row_indices(coords, df) -> Dict{String, Vector{Int}}

Return, for each column shared between df and coords, the 1-based index into the corresponding coordinate vector for every row of df.

coords and df are both column-name-to-vector mappings. Every value in a shared column must match exactly one coordinate value; throws UnalignedValuesError listing the offending rows otherwise, and throws ArgumentError when a df column has no matching coords entry. This mirrors Abacus abacus.mmm.calibration.alignment.exact_row_indices, adapted to Julia's native 1-based indexing.

source
Epsilon.finnish_horseshoe_coefficientsMethod
finnish_horseshoe_coefficients(prior, z, local_scales, global_scale)

Apply the regularized horseshoe coefficient construction.

This helper uses the prior's scale and slab_scale terms after the required latent draws have already been supplied. It does not sample or otherwise consume slab_df.

source
Epsilon.fit!Function
fit!(model::TimeSeriesMMM)
fit!(model::PanelMMM)
fit!(scaler::Union{MaxAbsScaler, StandardScaler}, data)

Fit an MMM model or preprocessing scaler in-place.

  • fit!(model::TimeSeriesMMM) runs the configured sampling backend and stores the resulting fit artifact on model.
  • fit!(model::PanelMMM) runs the bounded hierarchical panel sampling backend and stores the resulting fit artifact on model.
  • fit!(scaler, data) estimates scaling parameters from vector or matrix data for later transform or inverse_transform calls.
source
Epsilon.fourier_featuresMethod
fourier_features(dayofperiod, period, n_order)

Construct a Fourier design matrix with n_order sine modes followed by n_order cosine modes for the provided within-period positions.

This ordering matches Abacus's retained Fourier helpers: sin_1, sin_2, ..., cos_1, cos_2, ....

source
Epsilon.gamma_shape_scaleMethod
gamma_shape_scale(mu, sigma)

Convert a PyMC-style Gamma(mu, sigma) mean/standard-deviation parameterization into the (shape, scale) parameterization used by Distributions.Gamma. mu and sigma must both be strictly positive.

source
Epsilon.geometric_adstockFunction
geometric_adstock(x, alpha=0.0, l_max=12; normalize=false, axis=1, mode=After)

Apply geometric adstock along axis.

alpha may be a scalar or a batch-shaped array that broadcasts against the non-convolved dimensions of x.

source
Epsilon.hill_functionMethod
hill_function(x, slope, kappa)

Apply the Hill saturation curve elementwise.

slope and kappa may be scalars or arrays that broadcast against x.

source
Epsilon.horseshoe_coefficientsMethod
horseshoe_coefficients(prior, z, local_scales, global_scale)

Apply the horseshoe coefficient construction to latent standard-normal draws and shrinkage scales.

source
Epsilon.inference_resultsMethod
inference_results(model; new_data=model.data, include_prior=true, include_posterior_predictive=true, include_prior_predictive=true)

Extract the canonical grouped inference-results artifact from a fitted model.

This grouped surface is additive to model_results(model; ...): the existing ModelResults container remains the flatter convenience view, while InferenceResults preserves grouped posterior, prior, predictive, sample-stat, and observed-data content together for supported Turing-backed fits.

source
Epsilon.lift_test_estimated_liftMethod
lift_test_estimated_lift(saturation_fn, x, delta_x)

Compute the model-estimated lift saturation_fn(x + delta_x) - saturation_fn(x) for a lift-test row, mirroring the core computation in Abacus abacus.mmm.calibration.graph.add_saturation_observations. saturation_fn must accept and return a vector (for example x -> centered_logistic_saturation(x, lam)).

source
Epsilon.lift_test_estimated_lift_adMethod
lift_test_estimated_lift_ad(saturation_fn, x, delta_x)

AD-compatible variant of lift_test_estimated_lift for use on the Turing sampling path, where saturation_fn may close over sampled saturation parameters and therefore return AD numeric types (for example ForwardDiff.Dual or ReverseDiff.TrackedReal) rather than plain Float64. Computes saturation_fn(x + delta_x) .- saturation_fn(x) without forcing Float64 conversion of saturation_fn's output, unlike lift_test_estimated_lift (whose Float64.(collect(...))-based result validation would otherwise truncate AD dual/tracked numbers and break gradients).

x and delta_x are the fixed (non-parameter), already-scaled calibration data and are still eagerly validated as finite Float64 vectors; only saturation_fn's output is left untouched so that AD types survive.

source
Epsilon.lift_test_gamma_distributionMethod
lift_test_gamma_distribution(mu, sigma)

Build the Distributions.Gamma lift-test observation distribution Abacus registers via pm.Gamma(mu=mu, sigma=sigma, observed=...) in abacus.mmm.calibration.graph.add_saturation_observations.

source
Epsilon.lift_test_likelihood_termsMethod
lift_test_likelihood_terms(saturation_fn, x, delta_x, delta_y, sigma)

Compute the Abacus lift-test likelihood-term ingredients for one batch of lift-test rows: the Gamma observation mean mu = |estimated_lift|, the observed value |delta_y|, and the elementwise Gamma log-density logp = logpdf(Gamma(mu, sigma), |delta_y|). Returns a named tuple (; mu, observed, logp).

source
Epsilon.lift_test_log_densityMethod
lift_test_log_density(saturation_fn, x, delta_x, delta_y, sigma)

AD-compatible lift-test log-density contribution for one batch of lift-test rows, computed entirely from already-scaled model-space values: the total Gamma log-density sum(logpdf(Gamma(mu, sigma), |delta_y|)), where mu = |saturation_fn(x + delta_x) - saturation_fn(x)|.

This mirrors the (summed) logp produced by lift_test_likelihood_terms, but unlike that function it does not force saturation_fn's output to Float64, so it is safe to call with a saturation_fn that closes over sampled Turing parameters. That makes it suitable for Turing.@addlogprob! integration on the model's saturation parameter sampling path (Task 15-05). This function itself has no dependency on Turing. saturation_fn must be a pure saturation closure with no adstock applied, preserving the calibration contract that adstock is never inserted into lift-test calibration.

Throws ArgumentError for mismatched lengths, non-finite x/delta_x/ delta_y, non-positive sigma, or a non-positive/non-finite estimated lift magnitude (which would make the observation's Gamma mean degenerate, for example when the estimated lift is exactly zero).

source
Epsilon.lift_test_payload_log_densityMethod
lift_test_payload_log_density(saturation_fn, payload, channel_param)

Multi-channel, LiftTestCalibrationPayload-aware entry point for lift_test_log_density: selects each row's saturation parameter from a full per-channel sampled parameter vector channel_param (indexed the same way as the model's channel axis, so that channel_param[payload.channel_index[i]] is the parameter for row i), then delegates to lift_test_log_density.

saturation_fn must accept (x_row, param_row) — both row-aligned vectors — and return a row-aligned vector, for example (x_row, lam_row) -> centered_logistic_saturation.(x_row, lam_row).

This is the intended calibration entry point for Task 15-05's Turing.@addlogprob! wiring, where channel_param is a sampled Turing parameter vector (for example the model's lam) and may carry AD dual/tracked numeric types; this function itself has no dependency on Turing.

Throws ArgumentError if any payload.channel_index value is out of bounds for channel_param, so a channel-index/parameter-vector length mismatch fails closed rather than throwing an opaque BoundsError deep inside AD.

source
Epsilon.load_modelMethod
load_model(path)

Load a serialized Epsilon model object from path.

Julia serialization artifacts are trusted-local only. Epsilon validates model payload lifecycle state after deserialization, including retained HSGP media state in schema-v2 envelopes.

source
Epsilon.load_public_configMethod
load_public_config(path; defaults=Dict(), overrides=Dict())

Load a YAML config file and return typed model and sampler config objects plus the merged effective mapping.

source
Epsilon.logistic_saturationFunction
logistic_saturation(x, lam=0.5)

Legacy compatibility alias for centered_logistic_saturation.

New code should call centered_logistic_saturation directly. The public config value media.saturation.type = "logistic" currently uses this centered logistic curve for compatibility with existing Epsilon model semantics.

Like centered_logistic_saturation, this alias interprets x as media spend or exposure and rejects negative inputs.

source
Epsilon.metric_resultsMethod
metric_results(results::InferenceResults; channel, grid=nothing, delta_grid=nothing)

Compute draw-level ROAS, mROAS, CPA, and mCPA for one supported media channel from grouped InferenceResults.

Metrics are derived from the same bounded response-curve surface returned by response_curve_results(results; channel, grid, delta_grid) rather than a separate formula path. Panel metrics therefore inherit the explicit delta_grid historical-scaling semantics of panel response curves.

source
Epsilon.metric_resultsMethod
metric_results(curves::ResponseCurveResults)

Compute draw-level ROAS, mROAS, CPA, and mCPA from a canonical ResponseCurveResults surface.

source
Epsilon.michaelis_mentenMethod
michaelis_menten(x, alpha, lam)

Apply the Michaelis-Menten saturation curve elementwise.

x is interpreted as media spend or exposure and must be nonnegative.

alpha and lam may be scalars or arrays that broadcast against x.

source
Epsilon.model_config_from_dictMethod
model_config_from_dict(config; defaults=Dict(), overrides=Dict())

Build a typed ModelConfig from a public YAML-style configuration dictionary. Nested mappings are merged with precedence defaults < config < overrides. Non-mapping values replace the whole node at the same path.

source
Epsilon.model_diagnosticsMethod
model_diagnostics(results)
model_diagnostics(model)

Extract typed chain diagnostics from fitted model results or a fitted model.

source
Epsilon.model_resultsMethod
model_results(model; new_data=model.data, include_posterior_predictive=true, include_prior_predictive=false)

Extract the flat convenience results object from a Turing-backed fitted model.

The richer grouped InferenceResults surface is the canonical grouped artifact entry point for supported Turing fits.

source
Epsilon.nobsMethod
nobs(data)

Return the number of observations in an MMM data container.

For MMMData, this is the number of time rows. For PanelMMMData, this currently returns flattened panel-cell observations, ntime(data) * npanels(data), to preserve existing panel artifact and model-spec contracts. Use ntime and npanels when those axes need to remain separate.

source
Epsilon.npanel_observationsMethod
npanel_observations(data::PanelMMMData)

Return the number of flattened panel-cell observations, ntime(data) * npanels(data).

source
Epsilon.npanelsMethod
npanels(data::PanelMMMData)

Return the number of flattened panel cells in a panel MMM data container.

source
Epsilon.ntimeMethod
ntime(data)

Return the number of time rows in an MMM data container.

source
Epsilon.observed_fitted_plotMethod
observed_fitted_plot(results::InferenceResults)

Render the bounded observed-versus-fitted time-series diagnostic for grouped InferenceResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.optimize_budgetMethod
optimize_budget(results::InferenceResults; total_budget, channels=nothing, budget_bounds=nothing, relative_bounds=nothing, objective=:total_response, grid=nothing, panel_allocation_mode=:historical_shares)

Run the bounded Phase 8 fixed-budget optimizer on one supported grouped InferenceResults artifact.

For time-series results, spend is allocated directly across channels. For panel results, v1 optimization allocates channel totals and preserves historical within-channel panel-cell spend shares (panel_allocation_mode = :historical_shares). Free channel-by-panel allocation, panel-total bounds, and channel-panel bounds are intentionally deferred because Stage 60 panel response curves are defined by a shared historical spend delta within each channel.

Supported constraints are the fixed total-budget equality, optional per-channel absolute bounds, optional observed-relative guardrails, and optional channel subset selection with unselected channels held fixed at observed spend.

total_budget, observed spend, explicit bounds, and response-curve spend grids must all use the same original input units as the channel columns supplied to MMMData or PanelMMMData. Epsilon does not convert currencies, time aggregation levels, or thousands/millions scaling at the optimizer boundary.

The nonlinear solve accepts locally feasible optima from Ipopt; response curves are smooth interpolations of posterior-mean grids, not a proof of global concavity.

source
Epsilon.panel_axesMethod
panel_axes(metadata_or_spec)

Return ordered flat panel-cell axis metadata. Non-panel metadata returns an empty vector.

source
Epsilon.panel_coordinatesMethod
panel_coordinates(metadata::ModelCoordinateMetadata)
panel_coordinates(spec::MMMModelSpec)

Return the deterministic mapping from Epsilon's flat panel_cell axis to named panel coordinates.

For one-dimensional and multi-dimensional panel models, Epsilon keeps panel_cell as the explicit flat axis and stores the declared panel-dimension coordinate columns in PanelAxis order.

source
Epsilon.pipeline_mainFunction
pipeline_main(args = ARGS)

Run the bounded Phase 9 pipeline CLI.

The current supported CLI surface is one thin command:

  • epsilon run <config_path>

All supported flags map one-to-one onto PipelineRunConfig and route through the same run_pipeline(config) implementation.

source
Epsilon.posterior_density_plotMethod
posterior_density_plot(results::InferenceResults; parameters=nothing, max_parameters=8)

Render a bounded posterior-density figure for grouped InferenceResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.predictFunction
predict(model, new_data=model.data)

Generate posterior predictive samples from the latest successful fitted MMM artifact.

source
Epsilon.prior_posterior_plotMethod
prior_posterior_plot(results::InferenceResults; parameter)

Render a bounded prior-versus-posterior density overlay for one parameter from grouped InferenceResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.prior_predictFunction
prior_predict(model, new_data=model.data)

Generate prior predictive samples for a typed MMM model.

source
Epsilon.r2d2_coefficientsMethod
r2d2_coefficients(prior, z, phi, tau2)

Apply the R2D2 coefficient construction to latent standard-normal draws.

This helper converts supplied phi and tau2 values into coefficient draws; it does not sample or otherwise consume the prior's mean_R2 or concentration hyperparameters directly.

source
Epsilon.r2d2_variance_weightsMethod
r2d2_variance_weights(prior, phi, tau2)

Convert simplex-like variance allocations and a global variance term into coefficient variances.

This deterministic helper uses prior.parameters[:scale] once phi and tau2 are already given. mean_R2 and concentration parameterize the upstream stochastic prior over those quantities and are therefore model-layer metadata rather than inputs to this variance calculation.

source
Epsilon.regularized_local_scalesMethod
regularized_local_scales(prior, local_scales, global_scale)

Compute regularized local scales for the Finnish horseshoe.

This deterministic helper uses prior.parameters[:slab_scale]. slab_df belongs to the stochastic slab prior in the later model layer and is not part of this closed-form local-scale update.

source
Epsilon.residual_diagnostics_plotMethod
residual_diagnostics_plot(results::InferenceResults)

Render the bounded residual-diagnostics figure for grouped InferenceResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.response_curve_plotMethod
response_curve_plot(results::ResponseCurveResults)

Render the bounded response-curve surface from ResponseCurveResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.response_curve_resultsMethod
response_curve_results(results::InferenceResults; channel, grid=nothing, delta_grid=nothing)

Compute a draw-level forward-pass contribution curve for one supported media channel from grouped InferenceResults.

For time-series results, grid is interpreted in original total-spend units across the observed horizon for the selected channel. For panel results, pass delta_grid; each delta rescales the observed historical spend path for every panel cell and the returned surface stays at panel-cell/channel level. This canonical Stage 60 surface preserves the observed temporal spend shape and replays the full scaled media path: channel scaling, adstock, saturation, and coefficient ownership.

source
Epsilon.run_pipelineMethod
run_pipeline(config::PipelineRunConfig)

Execute the bounded Phase 9 pipeline runner across the current supported stage surface.

The closed Phase 9 surface validates the supported pipeline contract, loads the combined CSV dataset, executes the bounded time-series MCMC stage sequence, persists stage-owned artifacts, and returns a truthful completed PipelineRunResult when all enabled stages succeed.

source
Epsilon.sampler_config_from_dictMethod
sampler_config_from_dict(config; defaults=Dict(), overrides=Dict())

Build a typed SamplerConfig from either a top-level public config or a nested sampler mapping. Nested mappings are merged with precedence defaults < config < overrides.

source
Epsilon.sampler_diagnosticsMethod
sampler_diagnostics(results)
sampler_diagnostics(model)

Extract typed HMC/NUTS sampler diagnostics from fitted model results or a fitted model.

source
Epsilon.sampler_warningsMethod
sampler_warnings(diagnostics; numerical_error_threshold=0, tree_depth_threshold=10, acceptance_rate_threshold=0.65)
sampler_warnings(results; ...)
sampler_warnings(model; ...)

Build typed user-facing warnings from sampler diagnostics, fitted results, or a fitted model.

source
Epsilon.saturation_curve_plotMethod
saturation_curve_plot(results::SaturationCurveResults)

Render the bounded saturation-only curve surface from SaturationCurveResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.saturation_curve_resultsMethod
saturation_curve_results(results::InferenceResults; channel, grid=nothing, delta_grid=nothing)

Compute a draw-level saturation-only curve for one supported media channel from grouped InferenceResults.

For time-series results, grid uses the same original-unit total-spend contract as response_curve_results(results; channel, grid). For panel results, pass delta_grid to apply the same panel-cell historical-scaling contract as response_curve_results. The replay path bypasses adstock and returns saturation-only contribution in observed target units.

source
Epsilon.save_modelMethod
save_model(path, model)

Serialize a typed Epsilon model object to path.

The current implementation persists the typed model/config/data state plus any fitted chain artifacts and metadata needed to resume posterior predictive use. Ephemeral backend closures are rebuilt on demand rather than written to disk.

Julia serialization artifacts are trusted-local only: deserialization executes before Epsilon can validate the restored structure. Model payload schema v2 validates retained HSGP media state after deserialization before restoring a model lifecycle.

source
Epsilon.scale_channel_lift_measurementsMethod
scale_channel_lift_measurements(channel, x, delta_x, channel_columns, transform)

Rescale lift-test x/delta_x values through a fitted channel transform (for example a fitted MaxAbsScaler's transform applied to its underlying matrix), mirroring Abacus abacus.mmm.calibration.scaling.scale_channel_lift_measurements.

Each row's value is embedded into a zero-filled (nrows, nchannels) matrix at its own channel's column, transform is applied to that full matrix, and each row's own scaled value is read back out. This reproduces Abacus's pivot/transform/unpivot behavior for any matrix-valued transform. Returns a named tuple (; channel, x, delta_x).

source
Epsilon.scale_lift_measurementsMethod
scale_lift_measurements(channel, x, delta_x, delta_y, sigma, channel_columns, channel_transform, target_transform)

Rescale a full lift-test dataset (channel-indexed x/delta_x plus target-like delta_y/sigma) for use against a scaled model, mirroring Abacus abacus.mmm.calibration.scaling.scale_lift_measurements. Returns a named tuple (; channel, x, delta_x, delta_y, sigma).

source
Epsilon.scale_target_for_lift_measurementsMethod
scale_target_for_lift_measurements(target, transform)

Rescale a lift-test target-like vector (delta_y or sigma) through a fitted target transform, mirroring Abacus abacus.mmm.calibration.scaling.scale_target_for_lift_measurements.

source
Epsilon.scenario_planMethod
scenario_plan(evaluation; current_scenario=...)
scenario_plan(evaluations; current_scenario=...)

Project evaluated manual-allocation scenarios into deterministic non-UI scenario-planner tables.

This overload consumes one or more ManualScenarioEvaluationResult values. It reports the supplied current scenario plus each evaluated manual allocation as scenario_type = "manual_allocation". It does not refit, optimize, simulate future spend paths, or solve optimization. Use scenario_plan(result, evaluations) when compatible manual evaluations and a solved fixed-budget optimization result should be compared in one plan.

source
Epsilon.scenario_planMethod
scenario_plan(result; current_scenario=..., optimized_scenario=nothing)
scenario_plan(result, evaluation/evaluations; current_scenario=..., optimized_scenario=nothing)

Build deterministic scenario-planner comparison tables from a solved BudgetOptimizationResult or PanelBudgetOptimizationResult.

This function is intentionally a reporting/planning projection. It does not simulate new spend paths, refit models, or solve another optimization problem. For panel results it preserves the v1 historical-share policy already encoded by optimize_budget.

When supplied with already evaluated manual-allocation scenarios, the combined overload returns one plan with current, manual, and optimised scenarios after verifying that all artifacts share the same model metadata, spec, coordinate metadata, objective, and current baseline.

source
Epsilon.summary_tableFunction
summary_table(result)

Project a typed Phase 7 post-model result surface into an analyst-ready DataFrame.

Current supported methods are:

  • summary_table(results::ContributionResults)
  • summary_table(results::DecompositionResults)
  • summary_table(results::ResponseCurveResults)
  • summary_table(results::SaturationCurveResults)
  • summary_table(results::AdstockCurveResults)
  • summary_table(results::MetricResults)
source
Epsilon.tanh_saturationFunction
tanh_saturation(x, b=0.5, c=0.5)

Apply tanh saturation elementwise.

This is the only signed low-level saturation primitive: reference fixtures include negative x values. Public MMM media containers and response grids still reject negative media spend before model replay.

b and c may be scalars or arrays that broadcast against x.

source
Epsilon.trace_plotMethod
trace_plot(results::InferenceResults; parameters=nothing, max_parameters=8)

Render a bounded posterior trace-plot figure for MCMC-backed grouped InferenceResults.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.validate_calibration_step_configMethod
validate_calibration_step_config(config)

Deprecated public validation wrapper for one CalibrationStepConfig.

Use CalibrationStepConfig construction or load_public_config calibration parsing instead. Direct calls emit a deprecation warning, then validate that method is non-empty and one of the currently supported calibration methods, and that params does not configure a custom dist.

source
Epsilon.validate_lift_test_columnsMethod
validate_lift_test_columns(columns)

Require that columns contains the lift-test data columns Abacus needs to register a calibration likelihood term: x, delta_x, delta_y, and sigma.

source
Epsilon.validate_mmm_dataMethod
validate_mmm_data(data)

Deprecated public validation wrapper for an MMMData container.

Use MMMData construction before building TimeSeriesMMM instead. Direct calls emit a deprecation warning, then validate the typed data container.

source
Epsilon.validate_model_configMethod
validate_model_config(config)

Deprecated public validation wrapper for one model configuration object.

Use ModelConfig construction or load_model_config instead. Direct calls emit a deprecation warning, then validate the typed model configuration.

source
Epsilon.validate_sampler_configMethod
validate_sampler_config(config)

Deprecated public validation wrapper for one sampler configuration.

Use SamplerConfig construction or load_sampler_config instead. Direct calls emit a deprecation warning, then validate sampler settings.

source
Epsilon.weibull_adstockFunction
weibull_adstock(x, lam=1, k=1, l_max=12; axis=1, mode=After, type=:pdf, normalize=false)

Apply Weibull adstock along axis.

lam and k may be scalars or batch-shaped arrays that broadcast against the non-convolved dimensions of x.

type accepts :pdf, :cdf, "pdf", "cdf", Epsilon.PDF, or Epsilon.CDF.

For type=:cdf, Epsilon preserves the current Abacus convention of prepending a leading self-retention term before cumulative multiplication, so the effective kernel has l_max + 1 entries.

source
Epsilon.write_plot_bundleMethod
write_plot_bundle(run::PipelineRunResult; output_dir=nothing) -> String

Write the bounded static plot bundle for a successful pipeline run.

Requires optional plotting support. Load CairoMakie before calling.

source
Epsilon.write_scenario_storeMethod
write_scenario_store(path, plan; metadata, spec, coordinate_metadata)

Write a local scenario store directory for plan.

The writer replaces the typed payload and known CSV sidecars. It removes stale channel_panel_allocations.csv sidecars when the current plan has no panel allocation table.

source