This project focuses on analyzing and forecasting the daily peak power demand of Maharashtra from 01-Apr-2024 to 21-Sep-2025. The dataset is sourced from the official Government of India open data portal:
Source: https://www.data.gov.in/resource/daily-peak-demand-mw-power-01-apr-2024-21-sep-2025
Using PyTorch, a Recurrent Neural Network (RNN) model is built, trained, evaluated, and used to forecast future peak energy demand.
Loaded the dataset and converted date columns into proper datetime format.
Visualized the demand trend over the full time period.
Checked for:
Seasonality patterns
Cyclic behavior
Trend shifts
Anomalies or missing values
Handled missing and inconsistent values (if any).
Scaled the demand values using MinMaxScaler to ensure stable neural-network training.
Created input sequences and labels for supervised RNN training.
Split the dataset into training and testing sets.
A Recurrent Neural Network (RNN) is built from scratch using PyTorch, with:
RNN Layer (with chosen hidden size and number of layers)
Fully Connected Layer for output
Adam Optimizer for training
Mean Squared Error (MSE) as the loss function
Trained the RNN to learn temporal dependencies in the energy-usage data.
Visualized training loss to ensure model convergence.
Evaluated the model on the test set.
Compared actual vs. predicted values visually.
Forecasted future peak power demand using the trained model.
You can run this project in Google Colab without any setup on your local machine.
Steps to Run:
Open Google Colab
Upload the Notebook
Upload the Dataset
Install Required Libraries (if not available):
!pip install torch pandas numpy matplotlib scikit-learnSelect GPU and run cells in order.