{"id":29431721,"url":"https://github.com/soumilgit/ai_ia-2","last_synced_at":"2025-07-12T20:40:18.406Z","repository":{"id":288654300,"uuid":"968811271","full_name":"Soumilgit/AI_IA-2","owner":"Soumilgit","description":"This project uses Long Short Term Memory (LSTM) neural networks to forecast hourly energy consumption, enabling smarter grid management, demand planning, and improved efficiency through data-driven insights.","archived":false,"fork":false,"pushed_at":"2025-04-18T19:54:39.000Z","size":3797,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T07:50:30.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soumilgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-18T19:24:32.000Z","updated_at":"2025-04-18T19:54:42.000Z","dependencies_parsed_at":"2025-04-19T08:01:27.177Z","dependency_job_id":null,"html_url":"https://github.com/Soumilgit/AI_IA-2","commit_stats":null,"previous_names":["soumilgit/ai_ia-2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Soumilgit/AI_IA-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soumilgit%2FAI_IA-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soumilgit%2FAI_IA-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soumilgit%2FAI_IA-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soumilgit%2FAI_IA-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soumilgit","download_url":"https://codeload.github.com/Soumilgit/AI_IA-2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soumilgit%2FAI_IA-2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265050269,"owners_count":23703667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-12T20:40:14.603Z","updated_at":"2025-07-12T20:40:18.397Z","avatar_url":"https://github.com/Soumilgit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Forecasting Hourly Energy Consumption with LSTM Networks\n\nThis project focuses on predicting **hourly power usage** using Long Short-Term Memory (LSTM) neural networks to improve **energy grid efficiency** and enable proactive grid management. By leveraging the PJM Interconnection dataset, we aim to develop a robust deep learning model that captures complex time-series patterns in electricity consumption data.\n\n---\n\n##  Problem Statement\n\nAccurate forecasting of hourly energy consumption is vital for efficient electricity distribution, cost savings, and sustainability. Traditional models often fail to capture the non-linear and dynamic nature of power usage patterns caused by:\n\n- Time of day and day of week\n- Weather conditions\n- Public holidays\n- Human activity trends\n\n---\n\n##  Objectives\n\n- Preprocess PJM energy dataset (handle missing values, outliers, and scaling)\n- Engineer temporal features (hour, day, weekend/weekday, holidays)\n- Visualize consumption patterns and correlation insights\n- Develop an optimized LSTM-based forecasting model\n- Evaluate model performance using RMSE, MAE, and MAPE\n- Compare results with baseline models (Persistence, ARIMA)\n- Deploy an accurate and interpretable forecasting solution\n\n---\n\n##  Technologies Used\n\n| Tool/Library     | Purpose                                  |\n|------------------|-------------------------------------------|\n| **Python**       | Core programming language                 |\n| **Pandas**       | Data manipulation and preprocessing       |\n| **NumPy**        | Numerical computations                    |\n| **Matplotlib / Seaborn** | Data visualization              |\n| **TensorFlow / Keras** | LSTM model building                |\n| **scikit-learn** | Evaluation metrics and scaling            |\n| **holidays**     | Generate national/public holiday features |\n\n---\n\n##  Dataset\n\n**PJM Hourly Energy Consumption Dataset**  \n- Covers power usage across 13 U.S. states and Washington, D.C.\n- Hourly consumption records from **2002 to present**\n- Publicly available and granular to regional levels\n\n---\n\n##  Implementation Overview\n\n1. **Data Preprocessing**\n   - Imputation for missing values\n   - Outlier detection (IQR/Z-score)\n   - Min-Max scaling for normalization\n\n2. **Feature Engineering**\n   - Time-based (hour, day, month, holidays)\n   - Lagged and rolling statistical features\n   - External signals (e.g., weather/temperature if available)\n\n3. **Modeling with LSTM**\n   - LSTM layers with dropout for generalization\n   - Optimized using grid search for hyperparameters\n   - Early stopping to avoid overfitting\n\n4. **Evaluation**\n   - Compared against ARIMA and Persistence models\n   - Performance metrics: RMSE, MAE, MAPE\n\n---\n\n##  Results \u0026 Key Findings\n\n- **15% improvement** in forecast accuracy vs ARIMA baseline\n- Effective prediction of **peak demand periods**\n- LSTM effectively learns **daily and weekly trends**\n- Training and validation loss converged consistently\n- Framework applicable for real-time grid forecasting\n\n---\n\n##  Future Scope\n\n- Incorporate real-time **weather forecasts**\n- Use advanced deep learning variants (e.g., Bi-LSTM, Transformers)\n- Expand to **renewable energy forecasting**\n- Deploy as a live dashboard or web app for grid operators\n\n---\n\n##  Contributors\n\n- **Soumil Mukhopadhyay** (16010122257)  \n- **Sharwar Patil** (16010122278)  \n- **Shreyas Nair** (16010122274)  \n- **Rohit Sharan** (16010122307)\n\n---\n\n##  Presentation\n\nThe full project presentation is available in the [`Presentation/`](./Presentation/) folder:  \n📂 [`Forecasting-Hourly-Energy-Consumption-with-LSTM-Nw.pptx`](./Presentation/Forecasting-Hourly-Energy-Consumption-with-LSTM-Nw.pptx)\n\n---\n\n##  Summary\n\nThis project demonstrates how deep learning can significantly improve electricity consumption forecasting. LSTM networks offer a data-driven approach to predict usage trends, helping pave the way for **smart grids**, **load balancing**, and **energy sustainability**.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumilgit%2Fai_ia-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoumilgit%2Fai_ia-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumilgit%2Fai_ia-2/lists"}