MAG OptiAI

Operational AI Input Specs

Anomaly Detection Input Specs

Use this guide to prepare the CSV accepted by the Anomaly Detection workspace. The input shape depends on the detector you choose: univariate detectors require only a timestamp and y; the contextual detector requires at least one exogenous feature; and general multivariate detectors accept exogenous features as an optional enhancement.

Overview

Use this guide to prepare valid input files for this workspace. Review the required files, exact column names, example rows, and common formatting rules before uploading.

Required files

3

Optional files

0

Spec sections

3

Applies to Z-score, STL Z-score

Univariate Anomaly CSV

Use this shape with the Z-score and STL Z-score detectors. These models score the observed series against itself and do not accept exogenous feature columns.

Required file

anomaly-series.csv

Single time-series dataset used for anomaly scoring in the Anomaly Detection workspace.

Requirements

Required / alternative columns

  • date or ds
  • y

Optional columns

  • numeric feature columns such as exo_temp

Approved aliases

  • date: ds

Shape requirements

  • Z-score and STL Z-score reject X/context feature columns.
  • Isolation Forest, LOF, and One-Class SVM allow optional numeric X/context feature columns.

Format limitations

  • Timestamp values currently use YYYY-MM-DD.

Unsupported currently

  • Nonnumeric X/context columns are not used as model features; they are warned and ignored.

Value rules and examples

  • Include either a date column or a ds column plus a numeric y column.
  • Every row needs a timestamp and a numeric observed value.
  • Z-score and STL Z-score reject extra feature columns; Isolation Forest, LOF, and One-Class SVM can use optional numeric feature columns.
  • Nonnumeric feature columns are surfaced as warnings and ignored rather than used as model features.

Example CSV table

dateyexo_temp
2024-01-0110018.1
2024-01-0210218.5

Common mistakes

  • Uploading a file with extra feature columns when using Z-score or STL Z-score — the backend will return a validation error.
  • Leaving timestamp cells blank or using inconsistent timestamp formats.
  • Uploading rows where y is missing or non-numeric.

Quick rules

  • Every Anomaly upload needs either date or ds together with y.
  • Z-score and STL Z-score are univariate detectors — they reject uploads that include exogenous feature columns.
  • STL Z-score also accepts an optional seasonal_period parameter in the workspace Configure step. Leave it blank to auto-detect from timestamp spacing.

Navigate

Keep the right guide close by

Pair this upload guide with the product page for workflow context or the resources hub for related public material.

Applies to Contextual Z-score

Contextual Anomaly CSV

Use this shape with the Contextual Z-score detector. This model fits a regression of y against the provided exogenous features, then scores the residual. At least one numeric exogenous feature column is required.

Required file

anomaly-series.csv

Time-series dataset for Contextual Z-score scoring. Requires at least one numeric exogenous feature column alongside the observed value.

Requirements

Required / alternative columns

  • date or ds
  • y
  • at least one numeric exogenous feature column

Optional columns

No optional columns documented for this file.

Approved aliases

  • date: ds

Shape requirements

  • Contextual Z-score requires at least one usable numeric X/context feature column.

Format limitations

  • Timestamp values currently use YYYY-MM-DD.

Unsupported currently

  • Nonnumeric X/context columns are warned and ignored; they do not satisfy the contextual feature requirement.

Value rules and examples

  • Include either a date column or a ds column plus a numeric y column.
  • At least one numeric exogenous feature column is required — Contextual Z-score fits y against these features and scores the residual.
  • Nonnumeric feature columns are surfaced as warnings and ignored; at least one usable numeric feature must remain.

Example CSV table

dateyexo_load
2024-01-0110210.2
2024-01-0211611.6

Common mistakes

  • Uploading a y-only file with Contextual Z-score selected — the backend requires at least one X column.
  • Using non-numeric values in feature columns.
  • Including features that are uncorrelated with y, which will reduce the model's ability to detect true contextual anomalies.

Quick rules

  • Contextual Z-score requires at least one numeric exogenous feature column — uploads without X columns will be rejected.
  • The exogenous feature columns are the context the model uses to predict expected y. Include features that genuinely explain variation in y.
  • All feature columns must be numeric on every row.

Navigate

Keep the right guide close by

Pair this upload guide with the product page for workflow context or the resources hub for related public material.

Applies to Isolation Forest, LOF, One-Class SVM

General Multivariate Anomaly CSV

Use this shape with Isolation Forest, Local Outlier Factor, or One-Class SVM. These detectors work on both single-variate and multivariate inputs — extra feature columns improve coverage but are not required.

Required file

anomaly-series.csv

Single time-series dataset used for anomaly scoring in the Anomaly Detection workspace.

Requirements

Required / alternative columns

  • date or ds
  • y

Optional columns

  • numeric feature columns such as exo_temp

Approved aliases

  • date: ds

Shape requirements

  • Z-score and STL Z-score reject X/context feature columns.
  • Isolation Forest, LOF, and One-Class SVM allow optional numeric X/context feature columns.

Format limitations

  • Timestamp values currently use YYYY-MM-DD.

Unsupported currently

  • Nonnumeric X/context columns are not used as model features; they are warned and ignored.

Value rules and examples

  • Include either a date column or a ds column plus a numeric y column.
  • Every row needs a timestamp and a numeric observed value.
  • Z-score and STL Z-score reject extra feature columns; Isolation Forest, LOF, and One-Class SVM can use optional numeric feature columns.
  • Nonnumeric feature columns are surfaced as warnings and ignored rather than used as model features.

Example CSV table

dateyexo_temp
2024-01-0110018.1
2024-01-0210218.5

Common mistakes

  • Assuming text labels in extra columns will behave like numeric features.
  • Adding feature columns but leaving the core timestamp or y fields incomplete.
  • Expecting the same file to work with Z-score or STL Z-score — those detectors do not accept feature columns.

Quick rules

  • Every upload still needs the base timestamp and y columns, even when extra features are present.
  • Additional feature columns should stay numeric so the workspace can include them in multivariate scoring.
  • Exogenous features are optional — these detectors fall back to univariate mode when no X columns are present.

Navigate

Keep the right guide close by

Pair this upload guide with the product page for workflow context or the resources hub for related public material.

Navigate

Keep the right input guide close

Return to the input-spec library for another upload contract, or go back to the resource hub for quickstarts, how-to guides, and use cases.