<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/google/meridian/blob/v2.2.1/meridian/model/spec.py#L278-L335) |

Holdout specification for training/evaluation split.

```python
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 `DateRange`s (global holdout for all geos during those dates).
- Sequence of `GeoHoldoutSpec`s (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.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `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`. |

<br />

## Methods

### `__eq__`

```python
__eq__(
    other
)
```

Return self==value.

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| resolved | `None` |

<br />