Git Product home page Git Product logo

mateoricio / forecasting_retail_sales_pa Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.78 MB

Helping our cousin from La Mancha to make stimations in the sales of iberian ham the next months. Applying feature engineer we help our SVM and Random Forest models to make the best predictions we can.

License: Apache License 2.0

Jupyter Notebook 99.84% Python 0.16%
random-forest-regressor svm-regressor time-series time-series-prediction retail sales-prediction

forecasting_retail_sales_pa's Introduction

forecasting_retail_sales_PA

Forecasting Ratail Sales in La Mancha

Introduction

Our cousind from La Mancha has a grocery store and after see in the inetrnet the possiblities of Machine Learning has asked us if we can apply it into his bussines and see if we can predict the sales of one of his products.

For this task we have received the sales of every category product (Referencia) each date (Fecha) and how much made was earned (Ventas)

Preprocessing and model training stages:

The procedure was clear, first we chose a product (iberian ham, as well spaniards) and after detect a weekly stationality in the model we applied some feature engineer to the dataset:

  • One-hot-enconding to create a boolean parameter for each day of the week, so the model knows which day of the week is.

  • shifting the sales of the product one week to give the model information about the last sales, it also allows the model to match certain values of sales with certain days since we have the boolean for the days, as we have.

After this preprocessing of the data we applied two different models:

  • Random Forest: Since its simplicity and well performence this was our first choice. In order to increase its speed we decided to put the hyperparameter of the stimators to 80 instead of 100 since we observe practicly the same performance in the half of the time. The results we obtained in 32.8s

random_forest_prediction

  • Support Vector Machine: In \order to check if we could have a similar performance with a even faster model we applied the support vector regressor. After play with the hyperparameters we put regulation parameter C at 0.75 and we observe a very nice performance in even lower time than the Random Forest model. In this case we obtained our results in 3.5s

SVM_prediction

forecasting_retail_sales_pa's People

Contributors

mateoricio avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.