detect_anomaly
Flag outlier points in numeric series using Z-score or IQR. Returns indices and values to identify anomalies in metrics, fraud signals, or sensor noise.
Instructions
[Premium] Flag outlier points in a numeric series using Z-score (parametric, assumes ~normal) or IQR (robust to skew). Use for monitoring metrics, fraud signals, sensor noise, quality control. Z-score is faster and tighter on near-normal data; IQR is the right default when the distribution has heavy tails or known outliers. Returns indices + values + the underlying statistics. For projecting a series forward, use predict_forecast. Requires ORACLAW_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Numeric series to scan. | |
| method | No | Default: zscore. | |
| threshold | No | Z-score: standard deviations above mean (default: 3.0). IQR: multiplier on IQR (default: 1.5). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| anomalies | Yes | ||
| stats | No | For zscore: {mean, stdDev, threshold}. For iqr: {q1, q3, iqr, lowerBound, upperBound}. | |
| totalPoints | No | ||
| anomalyCount | Yes |