How donny31415/group-sprint-1 works
This repository is a research workflow for estimating football-shot expected goals and analysing model performance. The principal path runs from shot data through preparation and model-specific prediction to common evaluation and spatial/team analysis. The README documents the main report sequence and capabilities; the sampled random-forest scripts show its feature split, model fitting, tuning and test prediction. Other model internals are represented at their documented report paths, not as inspected implementations.
Main entry points: 07_comparison_and_analysis.ipynb Model comparison · shots_cleaned.csv Cleaned shots · rf_01_features_and_split.py Season feature split · 02_data_processing.ipynb Data processing
Components 23
Shot data
- Understat shots
data/understat_shots.csv - StatsBomb shots
data/statsbomb_shots_all.csv - Cleaned shots
data/shots_cleaned.csv - Data processing
report/02_data_processing.ipynb
Model development
- Logistic regression
report/03_logistic_regression.ipynb - Gradient boosting
report/04_gradient_boosting.ipynb - Random forest
report/05_random_forest.ipynb - Neural network
dylan/neural_network.Rmd - Base-rate model
report/07_comparison_and_analysis.ipynb - LR predictions
results/lr_xg_predictions_2025_26.csv - GB predictions
results/gb_xg_predictions_2025_26.csv - RF predictions
results/rf_xg_predictions_2025_26.csv - NN predictions
results/nn_xg_predictions_2025_26.csv
Evaluation and analysis
- Understat benchmark
report/07_comparison_and_analysis.ipynb - Model comparison
report/07_comparison_and_analysis.ipynb - Performance table
results/statistical_performance_analysis_table.csv - Shot heatmaps
report/08_heatmaps.ipynb - Team xG analysis
report/08_heatmaps.ipynb
Random forest detail
- Season feature split
luke/rf_01_features_and_split.py - Single tree
luke/rf_02_single_tree.py - Forest OOB scoring
luke/rf_03_basic_forest_oob.py - Forest tuning
luke/rf_04_grid_search.py - Final forest
luke/rf_05_final_model_and_baselines.py
Connections 27
- Understat shots → Data processing: prepares
README.md - StatsBomb shots → Data processing: considers
README.md - Data processing → Cleaned shots: produces
README.md - Cleaned shots → Logistic regression: models
README.md - Cleaned shots → Gradient boosting: models
README.md - Cleaned shots → Random forest: models
README.md - Cleaned shots → Neural network: models
README.md - Cleaned shots → Season feature split: splits seasons
luke/rf_01_features_and_split.py - Season feature split → Single tree: supplies features
luke/rf_02_single_tree.py - Season feature split → Forest OOB scoring: supplies data
luke/rf_03_basic_forest_oob.py - Season feature split → Forest tuning: supplies groups
luke/rf_04_grid_search.py - Forest tuning → Final forest: selects settings
luke/rf_05_final_model_and_baselines.py - Season feature split → Final forest: supplies test data
luke/rf_05_final_model_and_baselines.py - Logistic regression → LR predictions: predicts
README.md - Gradient boosting → GB predictions: predicts
README.md - Random forest → RF predictions: predicts
README.md - Neural network → NN predictions: predicts
README.md - LR predictions → Model comparison: compares
README.md - GB predictions → Model comparison: compares
README.md - RF predictions → Model comparison: compares
README.md - NN predictions → Model comparison: compares
README.md - Base-rate model → Model comparison: benchmarks
README.md - Understat benchmark → Model comparison: benchmarks
README.md - Model comparison → Performance table: reports scores
README.md - Final forest → RF predictions: writes predictions
- Model comparison → Shot heatmaps: supports analysis
README.md - Shot heatmaps → Team xG analysis: aggregates xG
README.md