Zum Inhalt
HALOWERK

Agent Tools

series / anomaly

Runs three detectors over one series and reports what each saw: a robust z score on median and median absolute deviation, a robust seasonal-trend decomposition with a z score on the residual, and an isolation forest over value and step-to-previous. Every score is returned per point, so callers set their own threshold instead of trusting a verdict. The forest draws from a fixed seed: same request, same result. Under three full cycles the seasonal figure is marked as not robust.

POST https://tools.halowerk.com/v1/series/anomaly

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
pointsarrayJaEither plain numbers or objects with value and optionally time_unix_s (seconds since 1970), time (ISO 8601) and label. The service caps the whole request body at 256 KB, so long records reach that limit before maxItems.
methodsarrayNeinWhich detectors to run.
robust_z_thresholdnumberNeinAbsolute robust z score at which a point counts as an outlier.
season_periodintegerNeinPoints per season, e.g. 24 for hourly data with a daily rhythm. 0 leaves the seasonal part out.
stl_z_thresholdnumberNeinThreshold on the robust z score of the residual.
contaminationnumberNeinExpected share of outliers. Sets where the isolation forest cuts.
treesintegerNeinNumber of isolation trees.
sample_sizeintegerNeinPoints drawn per tree, capped at the series length.
seedintegerNeinFixed starting value for the forest. Same seed, same answer.
min_votesintegerNeinHow many detectors must agree before a point is called an anomaly.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "points"
  ],
  "properties": {
    "points": {
      "type": "array",
      "minItems": 3,
      "maxItems": 5000,
      "description": "Either plain numbers or objects with value and optionally time_unix_s (seconds since 1970), time (ISO 8601) and label. The service caps the whole request body at 256 KB, so long records reach that limit before maxItems."
    },
    "methods": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
        "type": "string",
        "enum": [
          "robust_z",
          "stl_residual",
          "isolation_forest"
        ]
      },
      "default": [
        "robust_z",
        "stl_residual",
        "isolation_forest"
      ],
      "description": "Which detectors to run."
    },
    "robust_z_threshold": {
      "type": "number",
      "minimum": 0.5,
      "maximum": 20,
      "default": 3.5,
      "description": "Absolute robust z score at which a point counts as an outlier."
    },
    "season_period": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000,
      "default": 0,
      "description": "Points per season, e.g. 24 for hourly data with a daily rhythm. 0 leaves the seasonal part out."
    },
    "stl_z_threshold": {
      "type": "number",
      "minimum": 0.5,
      "maximum": 20,
      "default": 3.5,
      "description": "Threshold on the robust z score of the residual."
    },
    "contamination": {
      "type": "number",
      "minimum": 0.0001,
      "maximum": 0.5,
      "default": 0.02,
      "description": "Expected share of outliers. Sets where the isolation forest cuts."
    },
    "trees": {
      "type": "integer",
      "minimum": 10,
      "maximum": 300,
      "default": 100,
      "description": "Number of isolation trees."
    },
    "sample_size": {
      "type": "integer",
      "minimum": 8,
      "maximum": 1024,
      "default": 256,
      "description": "Points drawn per tree, capped at the series length."
    },
    "seed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483647,
      "default": 42,
      "description": "Fixed starting value for the forest. Same seed, same answer."
    },
    "min_votes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 3,
      "default": 1,
      "description": "How many detectors must agree before a point is called an anomaly."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "points": [
    12.1,
    12.4,
    11.9,
    12.3,
    12,
    12.2,
    48.7,
    12.1,
    11.8,
    12.5,
    12.2,
    12
  ],
  "methods": [
    "robust_z",
    "isolation_forest"
  ],
  "contamination": 0.1,
  "seed": 42,
  "min_votes": 2
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →