Part of the Residual family.
Lineage
Overview
10 tests guard this model - 6 generic, 4 singular.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
One row per lap per named corner.
| Property | Value |
|---|---|
| Layer | intermediate |
| Family | Residual |
| Contract enforced | No |
| Tags | feature_engineering |
| Upstream | int_corner_metrics, int_stint_geometry, stg_laps, stg_sector_times |
| Column | Type | Nullable | Tests | Description |
|---|---|---|---|---|
corner_id | Yes | not_null, unique | PK = lap_id || ‘C’ || corner_name | |
lap_id | Yes | not_null | FK to stg_laps | |
corner_name | Yes | not_null | Named corner from dim_corners | |
braking_loss_s | Yes | Seconds lost on corner entry vs the backward-only trailing-5 field median, as (field median - own braking_point_m) * dt_per_dm at the sector-2 trap speed. POSITIVE = braked EARLIER than the field = time LOST. Negative = braked later = time gained. NULL when field_corner_sample_n < 5 or the corner is taken flat (no braking_point_m), both real answers rather than missing data. The (field - own) orientation is the fix 00d made and matches the house convention already in the feature contract (int_lap_telemetry_aggregates’ braking_point_drift_m is base - lap). | ||
mid_corner_residual_s | Yes | Seconds lost at the apex vs the trailing-5 field median, as (field v_min - own v_min) converted at the field apex speed. POSITIVE = carried LESS speed than the field = time LOST. Highest-coverage of the three phases: every corner has an apex. | ||
exit_residual_s | Yes | Seconds lost on exit vs the trailing-5 field median, as (own throttle_point_m - field median) * dt_per_dm. POSITIVE = regained full throttle LATER than the field = time LOST. Note the subtraction runs the other way round from the other two phases because throttle_point_m is higher-is-slower while braking_point_m and v_min_kph are higher-is-faster; all three still read positive = loss. | ||
corner_residual_total_s | Yes | braking_loss_s + mid_corner_residual_s + exit_residual_s: total seconds lost at this corner vs the field median. Non-NULL only where all three phases are measurable (the intersection, 38.59% of corner rows), which is why int_lap_corner_inputs aggregates each phase over its own measurable corners instead of using this column. Only a meaningful total since 00d gave the three phases one sign convention — before that it summed a gain with two losses, which is why 06b moved its headline off it. Closure pinned by transform/tests/assert_corner_closure.sql. | ||
field_corner_sample_n | Yes | not_null | Number of field observations behind this corner/lap’s median. Trailing-5 window (laps t-5 to t-1, RANGE frame): counts valid, non-NULL braking_point_m rows across ALL drivers in that lap interval. Reported UNFLOORED and never NULL, which is the trailing_observation_count contract: the count is what the >= 5 floor is applied to, so flooring it here would make “no prior lap at all” and “four prior laps” indistinguishable and leave the residual NULLs unexplainable. 0 on lap 2, which has no predecessor. The residuals themselves NULL out through trailing_median’s own min_observations=5, and corner_unmapped_flag carries the gate. | |
corner_unmapped_flag | Yes | not_null | TRUE when field_corner_sample_n < 5 (residuals are NULL) |