{"id":22546752,"url":"https://github.com/anshchoudhary/xgmodel","last_synced_at":"2025-04-10T00:52:55.568Z","repository":{"id":211905055,"uuid":"730234666","full_name":"AnshChoudhary/xGModel","owner":"AnshChoudhary","description":"This repository contains code to predict the Expected Goals (xG) from shots in football using various machine learning models.","archived":false,"fork":false,"pushed_at":"2024-06-21T07:20:12.000Z","size":860,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T00:52:50.756Z","etag":null,"topics":["data-science","football-analytics","football-data","machine-learning","machine-learning-algorithms"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnshChoudhary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-11T13:43:31.000Z","updated_at":"2025-02-13T13:08:08.000Z","dependencies_parsed_at":"2024-01-01T10:08:22.945Z","dependency_job_id":null,"html_url":"https://github.com/AnshChoudhary/xGModel","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"d73c0a02a57b81553489725824bef442e1a25f85"},"previous_names":["anshchoudhary/xgmodel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshChoudhary%2FxGModel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshChoudhary%2FxGModel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshChoudhary%2FxGModel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshChoudhary%2FxGModel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnshChoudhary","download_url":"https://codeload.github.com/AnshChoudhary/xGModel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137995,"owners_count":21053775,"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":["data-science","football-analytics","football-data","machine-learning","machine-learning-algorithms"],"created_at":"2024-12-07T15:08:47.924Z","updated_at":"2025-04-10T00:52:55.546Z","avatar_url":"https://github.com/AnshChoudhary.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Football Expected Goals (xG) Prediction\n\nThis repository contains code to predict the Expected Goals (xG) from shots in football using various machine learning models like Logistic Regression, XGBoost, and Random Forest.\n\n## Overview\n\nExpected Goals (xG) is a statistical metric used in football (soccer) that quantifies the probability of a shot resulting in a goal based on various features and historical data. This repository provides a predictive model to estimate xG for shots taken during a football match.\n\n## Dataset\n\nThe dataset used for this project includes information about shots taken during football matches. It contains features such as:\n- Shot location\n- Shot angle\n- Distance from goal\n- Type of play leading to the shot (e.g., open play, set-piece)\n- Other relevant match and player-specific information\n\nThe dataset can be downloaded from this website: https://www.kaggle.com/datasets/joopauloduartelima/football-event-data/\n\n## Results\nYou can find how the models performed in terms of accuracy, precision, recall and training time in the following table: \n\n![Results](https://github.com/AnshChoudhary/xGModel/blob/main/Outputs/Screen%20Shot%202023-12-11%20at%202.49.58%20PM.png)\n\n## Models Implemented\n\n### 1. Logistic Regression\n- Simple logistic regression model trained to predict xG based on shot features.\n\n### 2. XGBoost\n- Gradient Boosting algorithm using the XGBoost library to predict xG. It offers improved performance over traditional boosting methods.\n\n### 3. Random Forest\n- Ensemble learning method using Random Forest to predict xG by aggregating multiple decision trees.\n\n## Usage\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/AnshChoudhary/xGModel.git\n2. Install the necessary dependencies:\n   ```bash\n   pip install -r requirements.txt\n3. Run the notebooks or scripts associated with each model to train the models and predict xG from shots. \n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshchoudhary%2Fxgmodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanshchoudhary%2Fxgmodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshchoudhary%2Fxgmodel/lists"}