GithubHelp home page GithubHelp logo

derhefi / f1_quali_prediction Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 3.0 477 KB

Finding explainable models to predict Formula 1 Qualifying Results

Jupyter Notebook 100.00%
formula1 f1 ai linear-regression polynomial-regression multilayer-perceptron-network fastf1 aws

f1_quali_prediction's Introduction

Introduction

In this project, we train multiple models for predicting Formula 1 (F1) qualifying results based on historical data and data gathered during practice sessions. We compare their accuracy as well as their interpretability to the average F1 fan, based on how well broadcasters can incorporate the model’s explanation in their live feed. We also draw comparisons to the model developed by Amazon Web Services (AWS) that is currently used to create qualifying pace prediction graphics shown during F1 broadcasts.

The data for the training and testing of the models is gathered using the pyton library FastF1 (https://github.com/theOehrly/Fast-F1). We train 4 different kinds of models using data from the 2018-2020 seasons and test them using data from the 2021 season. The 4 kinds of models are Linear Regression, Quadratic Linear Regression, Cubic Linear Regression and Multilayer Perceptron Regression. For each kind of model, we train 12 models based on different features, like the fastest time posted by the driver during a certain practice session, the track, the team, etc.

TLDR Results

The AWS predictions are pretty inaccurate considering their ressources. Some of the models trained in this project match their accuracy, while being a lot more explainable to the average F1 fan.

Repo Description

  1. "F1_Quali_Prediction_Paper.pdf" is a short paper about this project, including a brief literature review, an overview of the methods used and an evaluation of the results.
  2. All used AWS predictions can be found in the folder "AWS_Predictions" algong with a file containing links to all the sites the predictions were taken from. Special thanks to /u/peeinmyblackeyes and the kind folks of reddit who helped me track down some of the AWS Predictions I couldn't find myself.
  3. The file "evaluation.csv" contains the key figures for all 48 trained models
  4. The folder "cache_folder" is necessary to speed up the data collection with FastF1
  5. The "Tyre_range.csv" file contains information about what range of tyres was used at what weekend for the 2017-2021 seasons. The file was not used in the final program.
  6. Running the "F1_Quali_Prediction.ipynb" takes around 5-6 hours. Most of the time is used to load the data (ca. 30 min) and to train the Multilayer Perceptron Regressors (ca. 4-5 hours). Note that you might have to install further packages in order to run the code. Even though the notebook contains some "!pip install ..." commands, these are by no means complete.

f1_quali_prediction's People

Contributors

derhefi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.