Predicting whether an F1 driver will pit on the next lap using race strategy data.
- Competition: Kaggle Playground Series S6E5 (Predicting F1 Pit Stops)
- Task: Binary classification (pit or not on next lap)
- Metric: ROC AUC
- Public Score: 0.94541
- Rank: 2047/3023 (top 68%)
- 439,140 training samples, 188,165 test samples
- 15 features including:
- Race context (lap, race number, position)
- Tyre information (compound, age, wear)
- Driver information
- Target imbalance: 80% no-pit, 20% pit
©️🖼️ Diagram Credits: https://gitdiagram.com/
- Categorical encoding: Label encoding for
Driver,Compound,Race - Train/validation split: 80/20 stratified
- No missing values
- Algorithm: LightGBM (gradient boosting with leaf-wise tree growth)
- Hyperparameters:
num_leaves: 31learning_rate: 0.05feature_fraction: 0.9num_boost_round: 500
- Validation AUC: 0.9466
- Public LB AUC: 0.94541
- Rank: 2047/3023 with single submission
- No feature engineering or hyperparameter tuning
notebooks/baseline_lightgbm.ipynb— Main notebook with full pipelinesubmission.csv— Final predictions for test setREADME.md— This file
pip install pandas numpy scikit-learn lightgbm- Feature engineering (lap phase, stint features, position changes)
- Cross-validation (5-fold)
- Hyperparameter tuning
- Ensemble with XGBoost/CatBoost
- Threshold calibration
Feel free to reach out for questions or feedback!