Revenue Prediction
Goal
The available dataset consists of a set of json files. Each json file contains the monthly transaction of our company.
The objective is to predict the total revenue generated during the 30 days following an input date.
The focus on this project is to develop and efficient and useful workflow. The project stats with an EDA, different models are then tested.
My main objective through this project was to build and deploy a model and an associated API.
The python code is available in my Github repository.
For the deployment of this model, I have chosen the following:
- Build a flask app to create a web interface.
- Build a Docker container for future use.
- Deploy a live version using Heroku
A live version can be accessed here
Note: The loading of the app can take a few seconds if Heroku needs to restart the build.
API
Prediction
Two inputs are used for the prediction:
- A country (if
all
is used then the predicted revenue encompasses all markets). - A date for which to compute our future revenue.
Training
The API allows the user to re-train a model for a specific country. This useful feature can help keep the model up to date with new data.
Logs
In order to monitor our model performance and trainings, two logs are kept up-to-date every time our models are trained or used for prediction.