Advanced Computer Lab 9th Sem
I built this in Advanced Computer Lab, 9th semester, to score, after qualifying, whether a driver will finish in the top three. The model never sees the race it is scoring. Training is 1950–2019, the choice between models is 2020–2021, and the test is the 68 Grands Prix of 2022–2024.
Abu Dhabi 2024, model output beside the circuit
What it is allowed to know
A current-race result, lap, pit stop, or points total cannot be a predictor for that same race. The site labels a model score, a historical result, and a what-if separately, and it treats the score as a ranking signal rather than a probability. On the 2024 season the model's top three and the first three on the grid both found 2.00 of the 3 podium drivers, on average. Qualifying already carries most of that. The extra output is a score for every starter, from the grid, recent form, and the championship standings.
Completed Work
Leakage-safe pipeline
One Python pipeline cleans the Ergast tables, builds the driver-race rows, and trains a logistic regression, a random forest, and a shallow network. Logistic regression had the best validation PR-AUC, 0.730 against 0.717 for the other two, so that is the model the site uses. Tests check the grain, the chronological split, and that a race result cannot leak into its own predictors. The pipeline also writes permutation importance and SHAP explanations.
- Built with
- Python, pandas, scikit-learn, SHAP
- Contribution
- I wrote the pipeline, the tests, and the notebook that runs the same analysis.
Race site
A site for those 68 held-out races. Each race has the circuit from the F1 timing map, the model's top three, a what-if on the exported weights, and the real classification, which stays hidden until the prediction is already on screen.
- Contribution
- I exported the fitted model and the race data, and built the site around that cutoff.
Course skills
Data work
Data cleaning, Feature engineering, Leakage control
Modeling
Classification, Chronological split, Model comparison, Explainability
Held-out scores
- Test PR-AUC
- 0.702
- Test ROC-AUC
- 0.935
- Validation PR-AUC, logistic regression
- 0.730
- Held-out races, 2022–2024
- 68
Looking back
- Tying the starting grid on the top three is not a weak result. Qualifying already names most of the podium. The useful output is the score for the drivers behind that, and not presenting that score as a chance.