Giter Club home page Giter Club logo

demand-forecasting's Introduction

Demand Forecasting

Playground of forecasting in R using Prophet.

Perform fine-grained forecasting in an efficient manner, leveraging the distributed computational power of the Databricks Platform.

Prophet is a forecasting tool that uses an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. The library is especially suited for business forecasts like forecasting website traffic, sales, and inventory.

The original paper from the FB team is in the Forecasting_at_Scale.pdf file.

Dataset

For the tests the Store Item Demand Forecasting from Kaggle is used. The data are in the dataset directory.

Keggle Dataset: https://www.kaggle.com/datasets/aswinkum/demand-forecasting-kernels-only

The dataset contains 5-years of store-item unit sales data for 50 items across 10 different stores (913,000 observations).

Forecasting in R-Studio

The source file in R for the forecasting is in Forecasting.R.

Read the comments for step-by-step execution of the forecast and plotting.

Forecasting in DataBricks

The DataBricks notebook for forecasting at scale is in the file OE_Demand_Forecasting.dbc.

500 forecasts are generated in the notebook.

read the training file into a Spark DataFrame

Upload the ./dataset/train.csv file to the catalog as a new table using the Data Ingestion of the DataBricks main interface.

Change the notebook code below accordingly:

train_data = spark_read_csv(sc, name = "train_data",  path = "/Volumes/industry_solutions/esg_scoring/data/train.csv")

AutoML auto-generated notebook

The auto-generated DataBricks notebook with the best AutoML model is in the file AutoML-24-04-30-16_08-Prophet.dbc

With this file is possible to re-run the experiment on forecasting 500 time series and see the results.

demand-forecasting's People

Contributors

marcoeg 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.