Skip to content

sufirehman/ElectricityConsumptionPredictionUsingDeepLearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก 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!

About

Electricity Consumption Prediction for London based households Using Deep Learning Approaches

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors