meridian.model.spec.HoldoutSpec

Holdout specification for training/evaluation split.

spec declares the holdout intent and can be one of:

  • Sequence of DateRanges (global holdout for all geos during those dates).
  • Sequence of GeoHoldoutSpecs (per-geo holdout date ranges).
  • RandomHoldoutSpec (random holdout ratio and optional seed).

The first two are deterministic: they resolve to the same holdout every time they are applied to the same input data. RandomHoldoutSpec is not, so the draw it produces is recorded in resolved. See RandomHoldoutSpec for the full lifecycle.

The two sequence forms are mutually exclusive: a single HoldoutSpec cannot mix global and per-geo entries, because the scope of the resulting holdout would be ambiguous.

spec Sequence[DateRange], Sequence[GeoHoldoutSpec], or RandomHoldoutSpec.
resolved The materialized result of a non-deterministic spec, expressed declaratively as per-geo date ranges. Set only when spec is a RandomHoldoutSpec; the deterministic variants reproduce their holdout exactly from spec, so this must be left as None for them. When set, this is authoritative and is never re-drawn. Default: None.

Methods

__eq__

Return self==value.

resolved None