Skip to content

Latest commit

 

History

History
118 lines (84 loc) · 2.97 KB

File metadata and controls

118 lines (84 loc) · 2.97 KB

⚡ Smart Energy Forecasting using Deep Learning, Seq2Seq, Prophet & LSTM (with Optuna Optimization)

📌 Overview

This project is an end-to-end time series forecasting system for electricity consumption prediction using multiple machine learning and deep learning models. It compares classical statistical methods, deep learning architectures, and probabilistic forecasting models to identify the most accurate approach.

The system includes:

Deep Learning models (LSTM, Seq2Seq) Statistical forecasting (ARIMA / SARIMA experimentation) Probabilistic forecasting (Facebook Prophet) Hyperparameter optimization using Optuna Model benchmarking using RMSE and MAE Time-aware forecasting with real DateTime alignment

🎯 Objective

To build and evaluate multiple forecasting models for electricity consumption prediction and improve predictive performance using hyperparameter tuning techniques.

🧠 Models Implemented

  1. 📊 LSTM (Long Short-Term Memory) Captures temporal dependencies in sequential energy data Handles non-linear patterns effectively Baseline deep learning model

  2. 🔁 Seq2Seq LSTM Encoder–Decoder architecture Designed for multi-step forecasting Predicts future time windows instead of single-step output

  3. 📈 Prophet (Facebook) Captures trend + seasonality decomposition Strong baseline for time series with seasonal patterns Includes weekly/yearly seasonality handling

⚙️ Hyperparameter Optimization (Optuna)

Optuna was used to improve LSTM model performance by tuning:

LSTM units Dropout rate Learning rate Batch size Epochs

Objective: Minimize RMSE on validation/test set

📊 Evaluation Metrics RMSE (Root Mean Squared Error) MAE (Mean Absolute Error)

Model RMSE MAE
Prophet 0.0165 0.0124
LSTM 0.0252 0.0140
Seq2Seq 0.0284 0.0171

📁 Dataset

Household electricity consumption dataset Granularity: Half-hourly readings Features: DateTime KWH/hh consumption values 🔧 Tech Stack Python 🐍 TensorFlow / Keras Scikit-learn Optuna Prophet Pandas, NumPy Matplotlib

📈 Workflow

Data preprocessing & normalization Train/test split (70/30) Sequence generation for LSTM & Seq2Seq Model training: LSTM baseline Seq2Seq encoder-decoder Prophet forecasting Hyperparameter tuning with Optuna Evaluation using RMSE & MAE Visualization using DateTime alignment Model comparison

📉 Key Insights

Prophet performed best in short-term forecasting LSTM captured temporal dependencies effectively Seq2Seq improved multi-step forecasting capability Deep learning models benefit significantly from hyperparameter tuning

🚀 Future Work

Hybrid model (LSTM + Prophet)

Reinforcement Learning for energy optimization

Carbon-aware forecasting integration

Deployment using Flask / FastAPI

Real-time prediction dashboard

📌 Author

Sufiyan Ul Rehman

AI / Machine Learning Researcher

Focus: Energy Forecasting, Deep Learning, Sustainable AI

⭐ If you like this project

Give it a star ⭐ and feel free to contribute!