View source on GitHub
|
Holdout specification for training/evaluation split.
meridian.model.spec.HoldoutSpec(
spec: (Sequence[DateRange] | Sequence[GeoHoldoutSpec] | RandomHoldoutSpec),
resolved: (Sequence[GeoHoldoutSpec] | None) = None
)
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.
Methods
__eq__
__eq__(
other
)
Return self==value.
Class Variables | |
|---|---|
| resolved |
None
|
View source on GitHub