Skip to main content
Part of the Residual family.
One row per lap per named corner. Decomposes corner skill into braking, mid-corner, and exit phases relative to field median (backward-only trailing-5 window, rebuilt 02g). Grain: (lap_id, corner_name). Null when field sample < 5 drivers. Enables high-res corner-by-corner skill profiling. WINDOW CHANGE (rebuilt 02g): field medians now use RANGE BETWEEN 5 PRECEDING AND 1 PRECEDING (trailing-5, all drivers at each lap level, excluding the focal lap). Previous construction used FLOOR(lap/5)*5 block buckets which reached forward 1.877 laps on average (38.45% of the median drawn from future, up to 76% at block position 0), placing future label signals in the baseline. Rebuild eliminated reach; contamination signal was weak (corr +0.0344 vs +0.0083 control, marginal; sd 0.116 vs 0.043 block, noise-shaped). COVERAGE: Lap-2 coverage loss (21.4pp on laps ≤ 6) is deterministic and non-leaking—lap 2 has no predecessor, so trailing window returns NULL. This loss sits on lap_number (already in contract via age_in_stint) and is declarable, not a hazard. No expanding window rescue attempted: lap 1 never reaches any lap to base a median on. An expanding window would pool early and late race track states (2026-09-08, measured trailing-5 vs expanding, identical formula, identical coverage loss on lap 2 in both cases). Trailing-5 kept for consistency with its width replacing the old block. SIGN CONVENTION (00d, 2026-09-20): all three phases are POSITIVE = SECONDS LOST vs the field median, negative = seconds gained, and corner_residual_total_s is their straight sum and therefore a real “seconds lost at this corner”. The direction of the underlying measure decides the subtraction: braking_point_m and v_min_kph are higher-is-faster so their residuals are (field - own); throttle_point_m is higher-is-slower (on power later) so its residual is (own - field). Before 00d, braking_loss_s alone was built as (own - field), so positive meant braking LATER = faster, while mart_corner_skill_driver summed all three z-scores into corner_skill_index and ordered ASC with no negation in between — one of three terms entered a shipped public leaderboard inverted, and corner_residual_total_s summed a gain with two losses. Fixed at the source rather than negated in the mart (the ruling and the full consumer trace are in _improvements/work/00-corrections.md, 00d). The direction is now pinned against the raw geometry by transform/tests/assert_corner_skill_sign_convention.sql, which no sign-agnostic closure or count test could catch — that is how the defect survived both the 02g and 02c rebuilds of this model.

Lineage

Overview

10 tests guard this model - 6 generic, 4 singular.

Columns