Fantasy La Liga Predictor is a machine learning model that provides users with accurate and timely recommendations on which players to purchase and at what price, ultimately helping users to create a winning Fantasy team for the Spanish football league, La Liga.
The architecture pipeline of the project is as follows:
- Data Extraction: Extract data from Fantasy LaLiga API with Lambda Function
- Data Storage: Store raw data on S3
- Data Transformation: This triggers a function app that initializes a Sagemaker Notebook to transform the data by cleaning and performing feature engineering and storing this final dataset on S3
- Model Training: Train model using SageMaker and save it on S3
- Model Deployment: Deploy model to a SageMaker Serverless instance
The model uses the following features to predict the performance of a player in the next match:
- Average number of points earned in the last 5 matches
- Total number of goals scored in the last 5 matches
- Average number of minutes played in the last 5 matches
- Number of previous injuries
- Average number of points earned at home
- Average number of points earned away
To use the app, you will need to deploy the Lambda functions and API Gateway as described in the Architecture section. Once you have deployed the necessary resources, you can run the app using the following command:
streamlit run app.py
This will start the Streamlit app, which you can access by navigating to http://localhost:8501 in your web browser. From there, you can enter the name or ID of a player and the app will return a recommendation on whether to buy or not based on the player's predicted performance in the next match.
This project is licensed under the terms of the MIT license.