{"id":19744748,"url":"https://github.com/theoddysey/epl-predictor","last_synced_at":"2026-06-12T17:33:03.785Z","repository":{"id":262226760,"uuid":"886590415","full_name":"TheODDYSEY/EPL-Predictor","owner":"TheODDYSEY","description":"EPL ⚽ Prediction App using Streamlit 🔫","archived":false,"fork":false,"pushed_at":"2024-11-11T09:02:48.000Z","size":1966,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T20:43:03.761Z","etag":null,"topics":["epl","python","random-forest-classifier","streamlit"],"latest_commit_sha":null,"homepage":"https://theoddysey-epl-predictor-app-mabpex.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheODDYSEY.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-11T08:52:18.000Z","updated_at":"2024-11-28T08:45:39.000Z","dependencies_parsed_at":"2024-11-11T10:19:07.501Z","dependency_job_id":"bf44d2d0-b531-4bb5-86b1-01908c82285d","html_url":"https://github.com/TheODDYSEY/EPL-Predictor","commit_stats":null,"previous_names":["theoddysey/epl-predictor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FEPL-Predictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FEPL-Predictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FEPL-Predictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FEPL-Predictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheODDYSEY","download_url":"https://codeload.github.com/TheODDYSEY/EPL-Predictor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241077072,"owners_count":19905718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["epl","python","random-forest-classifier","streamlit"],"created_at":"2024-11-12T02:00:55.254Z","updated_at":"2026-06-12T17:33:03.771Z","avatar_url":"https://github.com/TheODDYSEY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ⚽ EPL Expected Goals Projector\n\n### Predict Premier League match scores using Machine Learning \u0026 Poisson Statistics\n\n![Python](https://img.shields.io/badge/Python-3.x-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)\n![Streamlit](https://img.shields.io/badge/Streamlit-FF4B4B?style=for-the-badge\u0026logo=streamlit\u0026logoColor=white)\n![Scikit-Learn](https://img.shields.io/badge/Scikit--Learn-F7931E?style=for-the-badge\u0026logo=scikitlearn\u0026logoColor=white)\n![XGBoost](https://img.shields.io/badge/XGBoost-189AB4?style=for-the-badge\u0026logo=xgboost\u0026logoColor=white)\n![Pandas](https://img.shields.io/badge/Pandas-150458?style=for-the-badge\u0026logo=pandas\u0026logoColor=white)\n![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/TheODDYSEY/EPL-Predictor?style=for-the-badge\u0026color=yellow)\n![Forks](https://img.shields.io/github/forks/TheODDYSEY/EPL-Predictor?style=for-the-badge\u0026color=orange)\n\n**[🚀 Live Demo →](https://theoddysey-epl-predictor-app-mabpex.streamlit.app/)**\n\n\u003c/div\u003e\n\n---\n\n## 📸 Preview\n\n\u003cdiv align=\"center\"\u003e\n\n![App Preview](https://github.com/TheODDYSEY/EPL-Predictor/raw/master/img/app.png)\n\n\u003c/div\u003e\n\n---\n\n## 📖 About\n\n**EPL Expected Goals Projector** is a Streamlit web app that predicts English Premier League match outcomes using historical match data and four machine learning approaches. Select a season, pick two teams, and get projected scorelines, win probabilities, and RMSE metrics — all in real time.\n\n---\n\n## ✨ Features\n\n- ⚽ **Score projection** — predicted home and away goals for any EPL fixture\n- 📊 **Win probability** — home win / draw / away win percentages (Poisson model)\n- 🤖 **4 prediction models** — Poisson, Random Forest, XGBoost, and Ensemble\n- 📅 **Multi-season support** — select and compare across different EPL seasons\n- 📈 **RMSE display** — model accuracy metric shown per prediction\n- ✅ **Actual score comparison** — shows real result if the match has already happened\n- 🧠 **Feature selection** — automatically identifies most correlated stats per model\n\n---\n\n## 🤖 Models\n\n| Model | Type | Description |\n|---|---|---|\n| **Poisson Distribution** | Statistical | Models goals as independent Poisson processes; outputs win probabilities |\n| **Random Forest** | ML Regressor | Ensemble of decision trees trained on cumulative team stats |\n| **XGBoost** | ML Regressor | Gradient-boosted trees; handles non-linear feature interactions |\n| **Ensemble** | Combined | Averages RF and XGBoost predictions for reduced variance |\n\n---\n\n## ⚙️ How It Works\n\n### 1 — Data Preparation\nHistorical EPL match CSV files are loaded from `engg_data/`. Each file is cleaned and transformed to produce per-team cumulative statistics: wins, draws, losses, points, goals scored, goals conceded, and league position up to each matchday.\n\n### 2 — Feature Selection\nFor each prediction target (home goals, away goals), the pipeline computes Pearson correlations against all available features and selects the most correlated subset to feed into the model.\n\n### 3 — Model Training\nSeparate regression models are trained for home goals and away goals. The Ensemble model averages the outputs of Random Forest and XGBoost. Poisson parameters (λ_home, λ_away) are derived from historical attack and defence strength ratios.\n\n### 4 — Prediction\nWhen a fixture is selected, the system retrieves each team's latest cumulative stats up to that matchday, feeds them into the chosen model, and returns projected scorelines.\n\n### 5 — Visualization\nThe Streamlit UI displays the projected score, win probabilities (Poisson), RMSE, and — if the match has occurred — the actual result for comparison.\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Python 3.x\n- pip\n\n### Installation\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/TheODDYSEY/EPL-Predictor.git\ncd EPL-Predictor\n\n# 2. Install dependencies\npip install -r requirements.txt\n\n# 3. Run the app\nstreamlit run app.py\n```\n\n\u003e Open your browser at `http://localhost:8501`\n\n---\n\n## 🖥️ Usage\n\n1. Select an **EPL season** from the dropdown\n2. Choose a **prediction model** — Poisson, RandomForest, XGBoost, or Ensemble\n3. Pick the **Home team** and **Away team**\n4. Click **Run**\n5. View projected score, win probabilities, actual result, and RMSE\n\n---\n\n## 📁 Project Structure\n\n```\nEPL-Predictor/\n├── app.py               # Streamlit application entry point\n├── requirements.txt     # Python dependencies\n├── engg_data/           # Engineered CSV files per EPL season\n├── data/                # Raw historical match data\n└── img/\n    └── app.png          # App preview screenshot\n```\n\n---\n\n## 🛠️ Tech Stack\n\n| Library | Purpose |\n|---|---|\n| ![Streamlit](https://img.shields.io/badge/Streamlit-FF4B4B?logo=streamlit\u0026logoColor=white) | Web UI framework |\n| ![Pandas](https://img.shields.io/badge/Pandas-150458?logo=pandas\u0026logoColor=white) | Data loading, cleaning, feature engineering |\n| ![Scikit-Learn](https://img.shields.io/badge/Scikit--Learn-F7931E?logo=scikitlearn\u0026logoColor=white) | Random Forest Regressor, metrics |\n| ![XGBoost](https://img.shields.io/badge/XGBoost-189AB4?logo=xgboost\u0026logoColor=white) | Gradient-boosted regression |\n| `SciPy` | Poisson distribution and probability calculations |\n\n---\n\n## 🤝 Contributing\n\nPull requests and issues are welcome. Fork the repo, make your changes, and open a PR.\n\n---\n\n## 📄 License\n\nLicensed under the [MIT License](LICENSE).\n\n---\n\n## 🙏 Acknowledgments\n\n- [Football-Data.org](https://www.football-data.org/) for historical EPL match data\n- [Streamlit](https://streamlit.io/) for the web framework\n- [Scikit-learn](https://scikit-learn.org/) and [XGBoost](https://xgboost.readthedocs.io/) for ML algorithms\n\n---\n\n## ⭐ Star History\n\n\u003cdiv align=\"center\"\u003e\n\n[![Star History Chart](https://api.star-history.com/svg?repos=TheODDYSEY/EPL-Predictor\u0026type=Date)](https://star-history.com/#TheODDYSEY/EPL-Predictor\u0026Date)\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nMade with ❤️ using Python \u0026 Streamlit \u0026nbsp;·\u0026nbsp; ⚽ Happy predicting!\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoddysey%2Fepl-predictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheoddysey%2Fepl-predictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoddysey%2Fepl-predictor/lists"}