This repository documents my research project: Player Performance Analysis in Sports Using Data Analytics.
It delivers an end-to-end, reproducible machine learning pipeline for forecasting and interpreting player performance using football, then validating generalisability using basketball and cross-sport datasets.
Core focus: building models that are not only accurate, but also auditable and explainable (PCA + SHAP), with outputs presented in decision-ready form.
Stable verification point: v1.1-tech-nation
View release: https://github.com/agyekumboadi/player-performance-ml-pipeline/releases/tag/v1.1-evidence-snapshot
Sports and performance-driven sectors increasingly rely on analytics to improve decision-making, recruitment, training, and risk management. This work demonstrates my ability to:
- design a structured ML workflow from raw data to validated outputs,
- apply responsible modelling practices (evaluation discipline, leakage awareness, explainability),
- and communicate findings through clear evidence artefacts (saved visuals, metrics, and interpretation plots).
This repo shares:
- reproducible source code (Python + Notebook),
- workflow diagrams,
- evaluation outputs (metrics + plots),
- SHAP explainability visuals.
Note: raw datasets and trained model files are excluded for size, licensing, and academic integrity reasons. The repository remains a transparent technical record of methods, outputs, and evidence.
pip install -r requirements.txt
jupyter notebook src/Sports_Performance_Analysis_Model.ipynb
Open files:
- Notebook: Sports_Performance_Analysis_Model.ipynb
- Script: pipeline.py
- Analyse multi-sport performance datasets (Football, Basketball, Cross-Sport)
- Engineer and select features using correlation checks and PCA
- Train and compare predictive models: Logistic Regression, Random Forest, SVM
- Evaluate using standard metrics: Accuracy, Precision, Recall, F1-score, ROC AUC
- Improve transparency using SHAP (global + individual interpretability)
- Test model adaptability across non-football datasets (generalisability)
-
Data understanding & cleaning
- basic validation, missing-value handling, standardisation, and EDA
-
Feature engineering & selection
- composite KPIs and distribution checks
- correlation-based screening
- dimensionality reduction via PCA where appropriate
-
Modelling
- Logistic Regression baseline
- Random Forest for non-linear relationships
- SVM as a benchmark model
-
Evaluation & testing
- comparison across models and feature sets
- cross-sport validation to test transferability
-
Explainability
- SHAP summary plots (global importance)
- SHAP waterfall plots (individual prediction reasoning)
| Model | Feature strategy | Key metric (ROC AUC) | Interpretation |
|---|---|---|---|
| Random Forest | Top features | 0.8719 | Best balance of performance + interpretability |
| Logistic Regression | PCA-based | 0.88–0.89 (approx.) | Strong baseline, stable behaviour |
| Cross-sport testing | Transfer evaluation | Partial generalisation (ROC AUC: 0.5007) | Requires context-aware feature adjustments |
| Model | Feature strategy | ROC AUC | Notes |
|---|---|---|---|
| Random Forest | PCA feature space | 0.8889 | Strong non-linear performance on reduced dimensions |
| Random Forest | Top 10 feature subset | 0.8906 | Best overall trade-off between performance and interpretability |
| Model | ROC AUC |
|---|---|
| Logistic Regression | 0.8946 |
| Random Forest | 0.8906 |
| SVM | 0.8719 |
| Dataset | Accuracy | F1-score (weighted) | ROC AUC | Report |
|---|---|---|---|---|
| Basketball | 0.93 | 0.93 | 0.9719 | View |
| Cross-sport (running/rowing/cycling) | 0.59 | 0.57 | 0.5007 | View |
The visuals below are a small, curated subset of outputs generated by the pipeline.
Full folders are linked so assessors can verify additional artefacts quickly.
Selected exploratory analysis visuals (click to expand)
Full folder: view all EDA visuals
- Offensive performance indicators (e.g., goal contribution, goals, assists, shot-based measures) showed strong association with high performance outcomes.
- Random Forest using a selected feature subset delivered strong predictive capability while remaining interpretable through SHAP.
- SHAP explainability improved trust by showing which features drive predictions and how they interact.
- Cross-sport testing showed that the modelling approach is transferable in principle, but performance domains require tailored feature interpretation.
MyResearchProject/
└── Player_Performance_Analysis_in_Sports/
├── docs/
│ └── flowchart/ # Project workflow diagram(s)
│
├── outputs/
│ ├── analysis/ # Model evaluation PNGs + text outputs
│ ├── eda_visuals/ # Exploratory analysis visuals
│ ├── plots/ # PCA and other plots
│ └── shap_plots/ # SHAP explainability visuals
│
├── src/
│ ├── samuel_agyekum_research_project_player_performance_analysis.py
│ └── Sports_Performance_Analysis_Model.ipynb
│
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
└── requirements.txt
Samuel Boadi Agyekum
Data Analytics & IT Security Management (MSc) - UK
- GitHub: https://github.com/agyekumboadi
- LinkedIn: https://www.linkedin.com/in/samuel-agyekum-388a82150/
- Email: agyekumowuraku@outlook.com
Focus areas: Applied machine learning, reproducible analytics pipelines, explainable AI (SHAP), performance evaluation, and data governance.
Role in this project: Sole developer and researcher who designed the pipeline, implemented modelling (Logistic Regression, Random Forest, SVM), ran cross-sport testing, produced evaluation artefacts (metrics, confusion matrices, ROC AUC comparisons), and generated explainability outputs (SHAP).
This repository is presented as a transparent technical evidence pack: it documents methodology, implementation decisions, and reproducible outputs used to evaluate model reliability and transferability across datasets.









