Skip to content

This repository is part of the workshop Introduction to Time Series Forecasting. It introduces some basics on time series. It also presents ARIMA models and its variants as well as the Facebook Prophet forecasting model.

License

Notifications You must be signed in to change notification settings

MKB-Datalab/workshop_ts_forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 Masterclass - Introduction to Time Series Forecasting

Photo by Aron Visuals on Unsplash

This repository contains support material used during the Masterclass Introduction to Time Series Forecasting offered by JADS MKB datalab to JADS' students.

During these hands-on session students learn some some basics about time series and SARIMAX and Facebook Prophet models. We will explore topics such as:

  • What is Forecasting?
  • Some applications of Forecasting
  • What is Time Series ?
  • Time Series components
  • Introduction to ARIMA models (non-seasonal and seasonal ARIMA)
  • Introduction to Facebook forecasting model PROPHET

After completing this workshop, you will be able to identify time series and its properties using both statistical and graphical tools. You will be able to start applying ARIMA models and their variants SARIMA and ARIMAX: statistical models used for forecasting. Last but not least, you will get to know Facebook Prophet so you can start applying it and go further exploring it with different use cases.

Furthermore, during this session we present some real datasets and some challenges that might be encountered when working with real data.

📁 Data

In the pratical examples we used the following data:

  1. Data obtained from Google Trends. This data can be found here.

  2. The data referent to search of the word diet in USA was expanded and can be found here.

  3. global temperature dataset time series. This dataset includes global monthly mean temperature anomalies in degrees Celsius from 1880 to the present. Data are included from the GISS Surface Temperature (GISTEMP) analysis and the global component of Climate at a Glance (GCAG). This data can be found here.

  4. Data from Kaggle's competition Store Item Demand Forecasting Challenge which consists of 5 years of store-item sales data split in a training dataset (train.csv) and a test dataset (test.csv).

More specifically, in our examples, we used a part of this data that can be found here.

Material workshop

The following notebooks present more details about what we covered together.

In 01-Intro_time_series_tutorial_v220423.ipynb you learn about time series properties and how to identify them using both statistical and graphical tools.

Next, in [02-Forecasting_with_SARIMAX_v220423.ipynb]https://github.com/MKB-Datalab/workshop_ts_forecasting/blob/master/notebooks/02-Forecasting_with_SARIMAX_v220423.ipynb) you are introduced to ARIMA models and its variants. There we apply SARIMA model on a store-item sales data and forecast the sales 3 months in the future.

In the last notebook, 03-Forecasting_with_Facebook_Prophet_v220423.ipynb, we introduce Facebook Prophet. We compare it with other models such as SARIMAX and apply it to the same dataset. We finalize by comparing the performance of all models obtained (SARIMA and Prophet models).

Pre-requesits

✅ Knowledge of Python

✅ Dowload data in data/google_trends and in data/processed

✅ The following are the most important libraries we will be using and the versions that were used. Be sure you have them running:

🔧 numpy == 1.21.4

🔧 pandas == 1.2.4

🔧 matplotlib == 3.3.4

🔧 seaborn == 0.11.1

🔧 statsmodels==0.12.2

🔧 prophet==1.1.2

🔧 joblib==1.0.1

🔧 pmdarima==1.8.2

💻 Install requirements

  • The libraries above with versions are in so you can also install using: Install requirements using pip install -r time_series_requirements.txt.
    • Make sure you use Python 3 (I'm using 3.8.5).
    • My version of Conda 4.10.1
    • You may want to use a virtual environment for this.

◀️ Back to repository main page

About

This repository is part of the workshop Introduction to Time Series Forecasting. It introduces some basics on time series. It also presents ARIMA models and its variants as well as the Facebook Prophet forecasting model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published