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
}'from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.segments.post_segment(json={
"name": "Daily sales view",
"workspace_id": WORKSPACE_ID,
"features": ["foot_traffic", "promo_active"],
"labels": ["daily_sales"],
"interval": 86400,
"tolerance": 43200,
"live": True,
})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.segments.postSegment({
json: {
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
Concepts
Columns, grid, window, and normalization — the four decisions every segment pins down.
Create & manage
Create, list, inspect, edit, and delete segments.
Normalization
Every gap-filling strategy, fallback chains, per-field overrides, and templates.
Engineered features
The full catalog of derived columns — lags, rolling stats, event and calendar features.
Preview
See the actual rows a segment produces — including dry runs of unsaved configs.
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.

