Predict.aiDocs
Segments

Segments

The exact table a model trains on — columns, grid, window, normalization, and engineered features.

A segment is a curated view over your signals: which fields, on what time grid, over what window, with missing values filled how, plus any derived columns. It's the exact table a model sees — at training time and at inference time.

Segments matter because raw signals are rarely model-ready: they arrive at different cadences, have gaps, and often need derived context (lags, rolling averages, calendar flags) to be learnable. A segment pins all of those decisions down once, so training and serving always see the same data shape.

signals (raw, irregular)          segment (model-ready table)
────────────────────────          ─────────────────────────────────────────
daily_sales    ▪ ▪▪  ▪   ▪        timestamp   foot_traffic  promo  sales_ma7  daily_sales
foot_traffic   ▪▪ ▪ ▪▪ ▪▪▪   ──▶  07-13       1841          0      11980.2    12100.0
promo_active   ▪     ▪            07-14       1904          1      12111.5    12841.5
                                  07-15       …             …      …          …

Thirty seconds of API

curl -X POST "$API_BASE/v1/segment" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace-Id: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily sales view",
    "workspace_id": "'$WORKSPACE_ID'",
    "features": ["foot_traffic", "promo_active"],
    "labels": ["daily_sales"],
    "interval": 86400,
    "tolerance": 43200,
    "live": true
  }'

One row per day, two input columns, one column to predict. Everything else — normalization, engineered features, windows — is layered on from there.

In this section

Segments are the bridge to everything downstream: Pipelines bind a segment to a model, Goals build and maintain their own segment automatically, and segment-based inference prepares model input from the segment's live data.

On this page