What Actually Wins You F1 Points?

Inspiration

We love Formula 1 — the speed, the strategy, the drama. But one question always came up in the stands and group chats:

Is the race actually decided on Sunday, or was it over on Saturday?

That question became our project.

How We Built It

We used Google Colab to write the code and GitHub to collaborate.

  • Collected 26,692 laps of real 2025 F1 season data
  • Engineered 5 features: grid position, qualifying pace, recent form, team strength, and tyre compound
  • Trained two models — a Random Forest and a Neural Network
  • Used walk-forward validation so each race was predicted using only data from previous races — no cheating
  • Built a fully interactive dashboard with charts, driver cards, and a race-by-race breakdown

What We Found

We let the models learn from the data without telling them what mattered. Both independently agreed:

73% of your finishing position is decided before lights out.

Grid position alone explained more than half the outcome. Qualifying — not strategy, not tyres, not overtakes — is the real race.

The Random Forest predicted finishing positions within ±2 places 40% of the time. The Neural Network hit 33%. For a sport as unpredictable as F1, that's a meaningful result.

$$\text{What wins points} \approx \underbrace{55.8\%\ \text{grid} + 17.4\%\ \text{quali}}{\text{Saturday (73\%)}} + \underbrace{13.7\%\ \text{form} + 9.6\%\ \text{team} + 3.4\%\ \text{tyre}}{\text{Sunday (27\%)}}$$

Challenges We Faced

  • Handling retirements, missing laps, and messy real-world race data
  • Making sure the model never "saw the future" during training
  • Stopping the Neural Network from memorising instead of learning
  • Debugging JavaScript buried inside a Python-generated HTML file (one misplaced semicolon cost us an hour)
  • Learning to collaborate on GitHub under hackathon time pressure

What We Learned

  • Qualifying matters more than anyone wants to admit
  • Classical ML can beat Neural Networks when data is small and structured
  • Walk-forward validation is the only honest way to test sports predictions
  • Building a polished dashboard is just as hard as building the model
  • Real data is messy — cleaning it teaches you more than any tutorial
Share this project:

Updates