Skip to content

BLShaw/F1-Predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F1 Predictor

A Formula 1 prediction engine combining Monte Carlo simulation with Machine Learning for Grand Prix outcomes.

Key Features

  • Grand Prix Centric: Organizes data by Season and Round.
  • ML / Monte Carlo: Uses Machine Learning to predict probabilistic outcomes (Win/Podium %).
  • SHAP Explainability: Explains why a driver is predicted to finish in a certain position.
  • Sprints: Full support for Sprint Weekends.

Model Performance

The core ML engine (Random Forest Regressor) is trained on historical lap-time pace and qualifying results from 2022 to the present (96+ Grand Prix events). By evaluating raw car and driver pace, the model is highly effective at identifying the true grid hierarchy:

  • Points Finish Accuracy (Top 10): 78.2% (F1 Score: 0.760)
  • Mean Absolute Error (MAE): 3.20 positions (Accounting for Unpredictable race-day chaos like incidents, crashes and safety cars)

Clone the Repository

git clone https://github.com/BLShaw/f1-predictor.git

Install the dependencies

pip install -r requirements.txt

Run Application

streamlit run app.py

Screenshots

Screenshot_40 Screenshot_41 Screenshot_42 Screenshot_43 Screenshot_44 Screenshot_45 Screenshot_46 Screenshot_47 Screenshot_48

License

MIT License.

About

Forecasting Formula 1 race outcomes. Combines ML predictive modeling with data-driven visualizations to analyze grid positions, lap performance, and race dynamics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors