It is a machine learning project that predicts tennis match scores. By analyzing player rankings, historical performance, and other key factors, it provides insights into the possible outcomes of tennis matches. The goal is to help users make more informed decisions when betting on tennis matches. The project is based on getting tennis matches infos from SportRadar-TennisAPI and use them to predict the results of the next week matches. The prediction is based on a RandomForest classifier with the best hyperparameters (but can be adjusted if you want to increase the performance of the model). In order to keep the dataset up to date, data are extracted every sunday from the API and model is also trained again to reflect matches results.
GAME SET & BET 🎾
These instructions allow you to run a copy of the project locally on your system for development and testing purposes. Refer to the "Deployment" section for the steps to follow to deploy the project in production.
To run the SmashTheOdds project, you must :
- Clone the repository
git clone https://github.com/giovannimin/SmashTheOdds.git
- Install python libraries needed
pip install requirements.txt
- Create token.txt file on root and paste token from SportRadar-TennisAPI
- install Ansible and Docker tool to run the entire project (otherwise you can also run the API locally with command in prompt
python3 -m pytest tests/ ─╯
As soon as everything is correctly installed you can knwo open the API and play with the tool by entering a match_id found in the planning_table.csv and then the API will return the class if player 1 is winner (class 0 is lost, class 1 if won), then you can get the probability to entere in the class and then the odds let's play!
- fastAPI as interface to visualize result
- Docker for containerization
- Apache-Airflow for orchestration
- gitActions for test
Please feel free to submit issues and feature requests!