JakubTomaszewski / Time-Series-Shop-Returns

University project: Predicting the number of returns to the shop's warehouse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Predicting daily number of returns using time series

About the project

Some part of the project has been created for a Computer Science course at my University (Warsaw University of Technology). After passing the semester I have decided to further develop the project, by testing more models, adding new features, and deploying them with Docker.


Project description

Context

An online computer shop called "eSzoppping" is our client. The shop warehouse workers are struggling with organising and processing order returns, as they don't know how many packages to expect.

Task

The goal of this project is to create a model, which will support the warehouse workers by predicting the number of returned orders for the next 14 days.

Data available:

  • users
  • products
  • user session data
  • parcel deliveries data

Project plan

  • Define a business goal
  • Define success criteria
  • Analyze the data
  • Clean the data
  • Prepare the data
  • Training a model
  • Testing
  • Dockerizing created models
  • Deployment
  • Perform A/B Tests

Technologies

  • Data analysis and modeling

Python 3.8 numpy pandas scitit-learn

  • Deployment

Docker JS React JS CSS Flask GitHub Actions


Preparing the environment

The packages used to create this project are located in the requirements.txt file.

For creating a development environment i recommend using conda. Simply run the command below

$ conda create --name my_env --file requirements/conda_requirements.txt

Or install it in an existing environment

$ conda install --file requirements/conda_requirements.txt

If you with to use pip, install the requirements by running the following command

$ pip install -r requirements/pip_requirements.txt

Launching the app

In order to launch the whole app use docker-compose. After running the command below, two containers will be created, one with the backend app and the other with the frontend app.

$ docker-compose up

To deploy only the model microservice run the following command

$ docker run -dp 8020:8020 --name returns-prediction-app-backend jtomasz/returns-prediction-app-backend

To run only the frontend app execute the command below

$ docker run -dp 3000:3000 --name returns-prediction-app-frontend jtomasz/returns-prediction-app-frontend

You can also pull the containers from DockerHub manually

$ docker pull jtomasz/returns-prediction-app-backend
$ docker pull jtomasz/returns-prediction-app-frontend

Or build the image by yourself

$ docker build -t jtomasz/returns-prediction-app-backend -f Dockerfile.backend .
$ docker build -t jtomasz/returns-prediction-app-frontend -f Dockerfile.frontend .

About

University project: Predicting the number of returns to the shop's warehouse


Languages

Language:Jupyter Notebook 99.0%Language:JavaScript 0.4%Language:Python 0.4%Language:HTML 0.2%Language:CSS 0.1%