{"id":23703093,"url":"https://github.com/jwanmardini/dota2-ml-project","last_synced_at":"2026-04-18T17:03:20.958Z","repository":{"id":269487199,"uuid":"907567693","full_name":"JwanMardini/Dota2-ml-project","owner":"JwanMardini","description":"This project uses machine learning to analyze and predict outcomes in Dota 2 matches.","archived":false,"fork":false,"pushed_at":"2024-12-23T22:27:27.000Z","size":5088,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T15:06:27.490Z","etag":null,"topics":["classification","fastapi","machine-learning","reactjs","tailwindcss"],"latest_commit_sha":null,"homepage":"https://machine-learning-frontend.onrender.com/","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/JwanMardini.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-23T22:22:29.000Z","updated_at":"2024-12-23T22:34:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4931500-bcb1-4db6-8e7c-e2d8721b7950","html_url":"https://github.com/JwanMardini/Dota2-ml-project","commit_stats":null,"previous_names":["jwanmardini/dota2-ml-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JwanMardini/Dota2-ml-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JwanMardini%2FDota2-ml-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JwanMardini%2FDota2-ml-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JwanMardini%2FDota2-ml-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JwanMardini%2FDota2-ml-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JwanMardini","download_url":"https://codeload.github.com/JwanMardini/Dota2-ml-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JwanMardini%2FDota2-ml-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31976806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T16:27:12.723Z","status":"ssl_error","status_checked_at":"2026-04-18T16:27:11.140Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["classification","fastapi","machine-learning","reactjs","tailwindcss"],"created_at":"2024-12-30T13:00:39.882Z","updated_at":"2026-04-18T17:03:20.953Z","avatar_url":"https://github.com/JwanMardini.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dota 2 Machine Learning Project\n\nThis project focuses on analyzing and predicting outcomes in Dota 2 matches using machine learning. It features an end-to-end pipeline, from data preprocessing to deploying a trained model via a backend API and an interactive web interface. The project is hosted online, enabling easy access and usability.\n\n- **Visit the live demo**: [Dota 2 ML Project Website](https://machine-learning-frontend.onrender.com)\n\n---\n\n## Dataset Description\n\nDota 2 is a popular computer game with two teams of 5 players. At the start of the game each player chooses a unique hero with different strengths and weaknesses. The dataset is reasonably sparse as only 10 of 113 possible heroes are chosen in a given game. All games were played in a space of 2 hours on the 13th of August, 2016\nThe data was collected using: https://gist.github.com/da-steve101/1a7ae319448db431715bd75391a66e1b\n\n### Additional Variable Information\nEach row of the dataset is a single game with the following features (in the order in the vector):\n1. Team won the game (1 or -1)\n2. Cluster ID (related to location)\n3. Game mode (eg All Pick)\n4. Game type (eg. Ranked)\n5. - end: Each element is an indicator for a hero. Value of 1 indicates that a player from team '1' played as that hero and '-1' for the other team. Hero can be selected by only one player each game. This means that each row has five '1' and five '-1' values.\n\nThe original Dota 2 dataset comes without headers or column names, and many fields use raw IDs that are difficult to interpret. To address this, a preprocessing script (`dota_data_mapper.py`) was created and executed. \n\n### Preprocessing Steps:\n1. **Mapping IDs**: \n   - Hero IDs, cluster IDs, game mode IDs, and game type IDs were mapped to meaningful names using metadata JSON files (`heroes.json`, `regions.json`, `mods.json`, and `lobbies.json`).\n2. **Adding Column Names**: \n   - Columns were labeled for clarity, with individual columns for each hero in the match.\n3. **Output**: The cleaned datasets (`dota2TrainFixed.csv` and `dota2TestFixed.csv`) are included in the repository.\n\nThis preprocessing ensures that the dataset is ready for machine learning tasks, making it easier to interpret and analyze.\n\n---\n\n## Machine Learning Pipeline\n\nAn end-to-end machine learning process is detailed in the `project_work.ipynb` Jupyter Notebook, covering the following steps:\n1. **Data Exploration**: Insights and visualizations to understand the dataset.\n2. **Feature Engineering**: Transforming data into a format suitable for modeling.\n3. **Model Training**: Building and evaluating a machine learning model to predict match outcomes.\n4. **Model Deployment**: Saving the trained model for integration into a backend service.\n\nThe notebook serves as a comprehensive guide to the machine learning process and can be used to reproduce the results.\n\n---\n\n## Backend API\n\nThe trained model is integrated into a FastAPI backend (`ml_api.py`) to provide predictions in real time. The backend:\n- Accepts input data in JSON format.\n- Processes the input using the trained model.\n- Returns predictions to the client.\n\nThe backend is hosted on Render, and the source code for the API is available in this repository.\n\n---\n\n## Frontend Application\n\nThe project includes a web-based frontend built with React and Tailwind CSS. The frontend:\n- Provides an intuitive interface for interacting with the model.\n- Sends requests to the FastAPI backend and displays the results.\n\nThe frontend is also hosted on Render and accessible at the [Live Demo](https://machine-learning-frontend.onrender.com).\n\n---\n\n## How to Run Locally\n\n### Set up the Python environment:\n```bash\nmake venv\nsource .venv/bin/activate  # Or .venv\\Scripts\\activate on Windows\nmake install\n```\n\n### Start the backend server:\n```bash\nKopiera kod\npython ml_api.py\n```\n### Run the frontend locally:\n```bash\ncd client\nnpm install\nnpm run dev\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwanmardini%2Fdota2-ml-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwanmardini%2Fdota2-ml-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwanmardini%2Fdota2-ml-project/lists"}