Skip to content

datasciencelovers/ML-Electricity_Demand_Forecasting_Model

Repository files navigation

ML-Electricity_Demand_Forecasting_Model

Build an Electricity Demand Prediction XGBoost ML Model in Python (Start-to-End Project)

Project Video available on YouTube - https://youtu.be/iop8TUxmgO0

Download Dataset - https://www.kaggle.com/datasets/rohitgrewal/electricity-demand-data-dsl

In this project, you will learn how to build a Machine Learning model with Python. We will build a XGBoost Model that will help us in forecasting of electricity demand in a city. You will learn how to handle time-series data, create powerful features, train a machine learning model and and evaluate its performance. Here, we have used a synthetic historical data of last 5 years. Based on this data we will predict the future demand using our model. This is a time series dataset with Per Hour information. In this dataset, we have multiple useful columns like - Temperature, Humidity, Demand etc. From the datetime column, we created other useful columns like day_of_year, week_of_year, is_weekend, is_holiday etc. We have used the line chart, box plot for visualization.

Key Learnings:

Time Series Data Handling

Feature Engineering for Demand Forecasting

Machine Learning (XGBoost) for Prediction

Model Evaluation (RMSE, MAE)

Understanding Energy Consumption Patterns

We will make use of :

Python: The core programming language

Pandas: Data manipulation and analysis

NumPy: Numerical operations

Matplotlib & Seaborn: Data visualization

Scikit-learn: Machine learning utilities

XGBoost: Gradient Boosting for robust predictions

Holidays: For national holiday data