Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: op-overlay-delta-vs-baseline
kind: operator
category: OVERLAY
operator: OVERLAY_DELTA_VS_BASELINE
description: Per-point additive delta against a fixed positional baseline of an ordered SERIES host.
type: reference
applies_to: process
examples_tags: [overlay, time-series, before-after]

Overlays decorate the host; no Response.Components.

Use when

Each point of an ordered series minus a chosen baseline point, in the value’s own units: how much it has moved since then.

Questions it answers:

  • How many more orders a week do we get than in the launch week?
  • How many points has satisfaction moved since the first wave?

Use something else:

  • OVERLAY_INDEX_VS_BASELINE when you want a ratio rather than a gap.

Params

NameTypeDefaultDescription
fieldstring—OUTPUT LABEL of the aggregation to score (label, else TYPE_field) or an expanded element column <label>[<elem>] (params.expand); absent = aggregations[0]; unknown → PULSE_OVERLAY_FIELD_UNKNOWN.
partition_bylist—A leading prefix of the group key columns (Host shape); anything else → PULSE_OVERLAY_PARTITION_INVALID.

scope must be group. ref.baseline_index.position (int, required) — >= 0; positional anchor in host order. level/within must be 0. Other ref arms → PULSE_OVERLAY_REF_INCOMPATIBLE_WITH_SHAPE.

Host shape

Ordered SERIES host (e.g. a date grouper). Over two or more groups it runs once per partition — the rows sharing the leading keys params.partition_by names (default all but the last, so the series runs down the last grouper; [] = one walk over every row), matched by key equality so a sort may interleave them — never crossing a segment. Subtractive twin of the baseline index.

Output

SERIES — one entry per host group key in host order, summary.statistic = point − baseline (the baseline point itself: 0). Layer summary.baseline = 0.

Contract

  • Weight: not read; a weight in force is skipped.
  • Streaming: buffered only.

Gotchas

  • Out-of-range position → PULSE_OVERLAY_REF_UNKNOWN at run time (predict cannot know the series length).
  • Zero baseline → no warning (subtraction defined for every finite value; delta becomes raw host value). The ratio twin raises PULSE_OVERLAY_REF_ZERO instead.
  • Absent host point → its entry keeps the key, no statistic.
  • Buffered: the baseline is read after the host finalizes.

See