This repository contains an end-to-end ML workflow for the Kaggle Playground Series S5E10 competition, where the goal is to predict a continuous road-accident risk score in [0,1].
This project demonstrates practical tabular ML iteration under competition constraints, including feature engineering, model optimization, ensembling, and submission generation.
- Feature engineering (interaction/ratio features)
- Categorical encoding + scaling
- Hyperparameter optimization with Optuna
- LightGBM + XGBoost ensemble with OOF validation
git clone https://github.com/fbenkhelifa/predicting-road-accident-risk.git
cd predicting-road-accident-risk
python -m venv .venv
# Windows PowerShell
.\.venv\Scripts\Activate.ps1
pip install pandas numpy scikit-learn lightgbm xgboost optuna matplotlib seaborn jupyter
# optional: install kaggle CLI and configure ~/.kaggle/kaggle.json
powershell -ExecutionPolicy Bypass -File scripts/download_data.ps1- Download competition files into
data/raw/kaggle_s5e10/usingscripts/download_data.ps1 - Open
notebooks/road-accident-risk.ipynband run cells in order
The notebook is configured for local paths under ../data/raw/kaggle_s5e10/.
- LGBM OOF RMSE:
0.056081 - XGB OOF RMSE:
0.056103 - Ensemble OOF RMSE:
0.056066
predicting-road-accident-risk/
├── data/
│ ├── README.md
│ ├── raw/
│ │ └── kaggle_s5e10/
│ └── processed/
├── notebooks/
│ └── road-accident-risk.ipynb
├── reports/
│ └── .gitkeep
├── src/
│ └── .gitkeep
├── scripts/
│ └── download_data.ps1
├── README.md
├── .gitignore
└── LICENSE
- Competition notebook format (limited production modularization)
- Data files are expected under
data/raw/kaggle_s5e10/and are not redistributed here - No automated tests/CI currently
- Split notebook logic into reusable Python modules
- Add reproducible config-driven training pipeline
- Add model-card style experiment summaries
- Publish inferencing script for batch scoring
Licensed under MIT. See LICENSE.