FORMULA 1 × MACHINE LEARNING

Predicting the qualifying grid.

An end-to-end machine-learning system that combines historical race data, circuit geometry, weather, and high-frequency driver telemetry to predict Formula 1 qualifying performance.

Explore the model
46%pole-position accuracy
MODELF1QUALIFYING
INPUT FEATURES187
SESSIONS TESTED65
TOP MODELBayesian Ridge
01

Data collection

FastF1 data provides speed, throttle, braking, gear, RPM, GPS position, tyres, weather, and session information.

02

Track engineering

GeoJSON racelines are resampled and converted into curvature, corner, segment, and circuit-level features.

03

Model development

Linear models, neural networks, Transformers, and ranking algorithms were compared across historical Formula 1 seasons.

04

Evaluation

The project evaluates overall grid fit separately from the more difficult objective of correctly predicting pole position.

INTERACTIVE PREDICTION LAB

Build a qualifying prediction

Choose a race and model, then watch the data move through the prediction pipeline.

STAGE 01

Track geometry

The circuit raceline is loaded from GeoJSON, converted into meters, evenly resampled, and transformed into curvature values.

Ba
2026 QUALIFYING FORECAST

Australia Grand Prix

Prediction ready
P1
PIA
Oscar PiastriMcLaren
POLE PROBABILITY23.2%
1:15.281
P2
NOR
Lando NorrisMcLaren
POLE PROBABILITY20.2%
1:15.346+0.065
P3
LEC
Charles LeclercFerrari
POLE PROBABILITY18.6%
1:15.402+0.121
P4
VER
Max VerstappenRed Bull Racing
POLE PROBABILITY17.4%
1:15.449+0.168
P5
RUS
George RussellMercedes
POLE PROBABILITY10.7%
1:15.588+0.307

The interface demonstrates how the project’s predictions could be presented. Values are static portfolio examples rather than live Formula 1 forecasts.

TELEMETRY PIPELINE

A lap becomes a sequence.

Each point contains information about what the track is doing and how the driver is responding.

CHANNELVELOCITY TRACE
RESOLUTION2,048 POINTS
MAX SPEED337 KM/H
Turn 1 braking
High-speed sector
Final corner
SpeedThrottleBrakeGearRPMCurvatureTyreWeather

MODEL COMPARISON

Pole accuracy matters more than R².

A model can approximate the entire grid well while still failing to identify the driver starting in first place.

01

Bayesian Ridge

29 of 65 pole positions

46%
02

F1ML1 Baseline

Previous project benchmark

40%
03

Champion Heuristic

Approximate benchmark

35%
04

Random Guess

One driver among twenty

5%

TRANSFORMER ARCHITECTURE

The lap is treated like a sentence.

Instead of words, every token represents one point along the circuit. Each token combines track curvature with the corresponding speed, throttle, and driver telemetry.

The Transformer examines relationships across the full lap and compresses them into a lap fingerprint used to predict qualifying time.

01Track geometryCurvature and distance
+
02Driver telemetrySpeed and throttle
03TransformerLap fingerprint
04Qualifying timePredicted grid

NEXT ITERATION

Where the model goes next.

01

Experiment with pairwise and listwise ranking loss.

02

Improve the use of segmented corner and track data.

03

Add additional practice sessions to Transformer training.

04

Include weather, strategy, and event context directly in the sequence model.