Skip to content

Energy prediction using the UCI Power Consumption dataset. After data cleaning and feature engineering, Random Forest and XGBoost models were trained. Both achieved over 99% accuracy, with XGBoost performing best. The project demonstrates highly accurate forecasting for smart energy management.

Notifications You must be signed in to change notification settings

MehwishSayyed/Week3--Household-Energy-Consumption-Forecasting-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”‹ Energy Consumption Prediction

This project predicts household energy usage using the UCI Individual Household Electric Power Consumption Dataset. After cleaning and preprocessing the data, advanced feature engineering techniques were applied (hour, weekday, rolling averages, and lag features). Models used include Random Forest and XGBoost, both achieving highly accurate results.

πŸ“Š Model Performance

Model MAPE MAE RΒ² Score Random Forest 2.11% 0.0138 0.99855 XGBoost 2.31% 0.0136 0.99893

➑️ XGBoost performed the best, achieving over 99% accuracy.

πŸ› οΈ Technologies Used

Python

Pandas, NumPy

Matplotlib, Seaborn

Scikit-learn

XGBoost

ucimlrepo (for dataset import)

πŸ”§ Features

Full data cleaning (missing values, outliers, type conversion)

Datetime index creation

Feature engineering:

Hour, weekday, weekend

Rolling averages (3, 6, 12 intervals)

Lag features (1 hour, 24 hours)

Machine learning models

Model comparison and evaluation

πŸš€ How to Run

pip install -r requirements.txt python notebook.ipynb

πŸ“ Dataset

UCI Machine Learning Repository – Individual household electric power consumption Loaded using:

from ucimlrepo import fetch_ucirepo dataset = fetch_ucirepo(id=235)

πŸ“Œ Conclusion

The project successfully demonstrates high-accuracy energy consumption forecasting. With RΒ² scores above 0.998, both models are suitable for real-world applications like smart energy systems and demand prediction.

About

Energy prediction using the UCI Power Consumption dataset. After data cleaning and feature engineering, Random Forest and XGBoost models were trained. Both achieved over 99% accuracy, with XGBoost performing best. The project demonstrates highly accurate forecasting for smart energy management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published