> ## Documentation Index
> Fetch the complete documentation index at: https://offthepace.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# int_lap_anomaly_flags

> Anomaly detection flags for data quality control.

<Note>Part of the [Residual](/transform/families/residual) family.</Note>

Anomaly detection flags for data quality control. One row per lap. Uses trailing-7-lap MAD (median absolute deviation) to classify anomalies robustly (cliff, mistakes, event-driven, conditions, normal).

## Lineage

```mermaid theme={null}
flowchart LR
  int_lap_residual_decomposed --> int_lap_anomaly_flags
  int_lap_anomaly_flags --> fct_cliff_prediction_features
  int_lap_anomaly_flags --> fct_driver_skill_features
  int_lap_anomaly_flags --> fct_stint_features
  int_lap_anomaly_flags --> int_lap_telemetry_aggregates
  style int_lap_anomaly_flags fill:#e40404,stroke:#e40404,color:#fff
```

## Overview

| Property          | Value                                                          |
| ----------------- | -------------------------------------------------------------- |
| Layer             | `intermediate`                                                 |
| Family            | [Residual](/transform/families/residual)                       |
| Contract enforced | No                                                             |
| Upstream          | [`int_lap_residual_decomposed`](./int_lap_residual_decomposed) |

**3 tests** [guard](/transform/ci/overview) this model  -  2 generic, 1 singular.

## Columns

| Column   | Type | Nullable | Tests                                                                        | Description              |
| -------- | ---- | -------- | ---------------------------------------------------------------------------- | ------------------------ |
| `lap_id` |      | Yes      | [`not_null`](/transform/ci/structural), [`unique`](/transform/ci/structural) | Foreign key to stg\_laps |
