Skip to content

Machine Learning in F1

Machine learning on Formula 1 data (timing + telemetry via FastF1). A notebook series going from raw data to models and error analysis:

  1. First look at the data - the FastF1 API on a single session (Monza 2024)
  2. Building the dataset - from raw laps to a feature table
  3. Exploratory data analysis (EDA) - what's in the data and what breaks models
  4. Regression: lap time - predicting lap times
  5. Classification: podium - who finishes on the podium?
  6. Error analysis - where and why the models get it wrong

Data: seasons 2023-2024 (46 races, about 39.6k clean laps, 918 driver-race pairs), pulled via FastF1 and available in the repository as parquet files. The model failures along the way are deliberate - they show why something does not work before we show the fix. More in About.

The notebooks are pre-executed - the (Plotly) charts are interactive without running anything. Source code: straightchlorine/f1-ml-lab.