This repository showcases a collection of time series forecasting projects implemented in Python. It covers a variety of models and techniques, including AR, ARIMA, SARIMA, VAR, Exponential Smoothing, Moving Average, Holt-Winters methods, and STL Decomposition. These projects demonstrate forecasting trends, seasonal patterns, and dependencies in time series data using real-world datasets.
This repository contains time series analysis using various models:
- Time Series Smoothing
- AR model (AutoRegressive)
- ARIMA (AutoRegressive Integrated Moving Average)
- SARIMA (Seasonal ARIMA)
- VAR (Vector AutoRegression)
This project is developed in Google Colab. Follow these steps to run the notebooks:
-
Clone or download the repository:
git clone https://github.com/your-username/time-series-forecasting.git cd time-series-forecasting
-
Open Google Colab (https://colab.research.google.com/).
-
Upload a notebook file (e.g.,
AR_model.ipynb
) by clicking on File > Upload Notebook. -
Upload the corresponding dataset from the
datasets/
folder into the Colab environment. -
Update the dataset file path in the notebook if necessary.
-
Run the notebook cells sequentially to reproduce the results.
- Description: AutoRegressive (AR) models forecast time series data based on past observations. It captures the dependency between a current observation and its lagged values.
- Dataset: Daily minimum temperature dataset.
- Objective: Predict future minimum temperatures using an AR model.
- Description: The ARIMA model combines autoregression (AR), differencing (I), and moving average (MA) to handle non-stationary data and trends.
- Dataset: Daily temperature readings from the Mauna Loa Observatory.
- Objective: Forecast future temperatures using ARIMA.
- Description: Seasonal ARIMA (SARIMA) extends ARIMA by including seasonal components, ideal for data with clear seasonality.
- Dataset: Monthly airline passenger traffic data.
- Objective: Forecast seasonal passenger traffic.
- Description: Vector AutoRegression (VAR) is a multivariate model that captures dependencies across multiple time series.
- Dataset: U.S. Personal Consumption Expenditure and Money Stock data.
- Objective: Analyze interdependencies and forecast future values of these economic indicators.
- Description: Exponential smoothing assigns exponentially decreasing weights to past observations, making it effective for forecasting data with trends or seasonality.
- Dataset: Monthly electricity production data.
- Objective: Smooth and forecast electricity production trends.
- Description: A simple method that uses the average of a fixed number of past observations to predict the next value.
- Dataset: Monthly electricity production data.
- Objective: Identify trends and forecast electricity production.
- Description: Holt-Winters extends Holt’s Linear Trend model by adding a seasonal component, making it suitable for seasonal data.
- Dataset: Monthly electricity production data.
- Objective: Model seasonality and trends for improved forecasting.
- Description: STL (Seasonal and Trend decomposition using Loess) separates a time series into seasonal, trend, and residual components.
- Dataset: Monthly electricity production data.
- Objective: Analyze and visualize the individual components of the time series.
- 1_Daily_minimum_temps.csv: Daily minimum temperature readings.
- MaunaLoaDailyTemps.csv: Daily temperature readings from Mauna Loa.
- airline-passenger-traffic(1).csv: Monthly airline passenger traffic data.
- PCEPersonalSpending.csv: U.S. personal consumption expenditure data.
- M2SLMoneyStock.csv: Money stock dataset.
- Electric_Production.csv: Monthly electricity production data.
Each notebook includes:
- Data preprocessing (e.g., handling missing values, stationarity checks).
- Model implementation and parameter tuning.
- Forecasts vs. actual values visualized through plots.
- Performance evaluation using metrics like RMSE and MAE.
- Add advanced models like LSTM and Facebook Prophet for forecasting.
- Develop an interactive dashboard for time series visualization and forecasting.
This project is licensed under the MIT License. See the LICENSE
file for details.