
Optimized Electricity Bill Prediction Using Machine Learning Techniques
Optimized Electricity Bill Prediction Using Machine Learning Techniques
IEEE BASE PAPER TITLE:
A Temporal–Spatial Graph Network With a Learnable Adjacency Matrix for Appliance-Level Electricity Consumption Prediction
IEEE BASE PAPER ABSTRACT:
Predicting the electricity consumption of individual appliances, known as appliance-level energy consumption (ALEC) prediction, is essential for effective energy management and conservation. Despite its importance, research in this area is limited and faces several challenges: 1) the correlation between the usage of different appliances has rarely been considered for ALEC prediction; 2) a learnable strategy for obtaining the optimal correlation between different appliance behaviors is lacking; and 3) it is difficult to accurately quantify the usage relationship among different appliances. To address these issues, we propose a graph-based temporal–spatial network that employs a learnable adjacency matrix for appliance-level load prediction in this work. The network comprises a temporal graph convolutional network (TGCN) and a learnable adjacency matrix that enables us to utilize correlations between appliances and quantify their relationships. To validate our approach, we compared our model with six others: a TGCN model with a fixed adjacency matrix where all elements are set to 0; a TGCN model with a fixed adjacency matrix where all elements are set to 0.5, except for the diagonal; a TGCN model with a randomly generated adjacency matrix, except for the diagonal; an Aug-LSTM model; a model with ResNetPlus architecture; and a feed-forward deep neural network. Five houses in four datasets: AMPDs, REFIT, UK-DALE, and SC-EDNRR are utilized. The metrics used in this study include root mean square error, explained variance score, mean absolute error, F-norm and coefficient of determination. Our experiments have validated the accuracy and practicality of our proposed approach across different datasets.
PROJECT OUTPUT VIDEO:
ALGORITHM / MODEL USED:
Stacking Regressor, Random Forest Regressor.
OUR PROPOSED PROJECT ABSTRACT:
The growing demand for energy efficiency and cost management in residential and commercial sectors has heightened the need for accurate electricity bill forecasting systems. This project, titled “Optimized Electricity Bill Prediction Using Machine Learning Techniques” presents a robust and scalable web-based solution that leverages predictive analytics to estimate monthly electricity bills based on appliance usage patterns and regional tariff structures.
Developed using Python as the backend with a responsive frontend built in HTML, CSS, and JavaScript, and integrated via the Flask web framework, the system utilizes a real-world dataset comprising 45,345 records. The dataset includes comprehensive features such as the number of electrical appliances (Fan, Refrigerator, AirConditioner, Television, Monitor, MotorPump), time-based parameters (Month), geographical indicators (City, Company), and consumption metrics (MonthlyHours, TariffRate) with the target output being the ElectricityBill.
The preprocessing pipeline involved Label Encoding of categorical features, removal of redundant columns like ‘Company’, and a structured feature-target split for training. Two regression models were employed and evaluated:
- The Random Forest Regressor achieved a Training Mean Absolute Error (MAE) of 0.55 and a Test MAE of 1.32.
- The Stacking Regressor, combining multiple learners, achieved a Training MAE of 0.82 and Test MAE of 1.50.
Both models demonstrated effective performance in predicting electricity bills, with Random Forest showing slightly superior generalization capability. The system further includes insightful visualization charts, such as appliance-wise usage distributions, monthly billing trends, and city-wise tariff comparisons, which enhance interpretability and user interaction.
This optimized and interpretable predictive solution provides valuable support for both consumers and utility providers, facilitating proactive energy planning, budgeting, and demand-side management.
SYSTEM REQUIREMENTS:
HARDWARE REQUIREMENTS:
- System : Pentium i3 Processor.
- Hard Disk : 20 GB.
- Monitor : 15’’ LED.
- Input Devices : Keyboard, Mouse.
- Ram : 8 GB.
SOFTWARE REQUIREMENTS:
- Operating System : Windows 10 / 11.
- Coding Language : Python 3.12.0.
- Web Framework : Flask.
- Frontend : HTML, CSS, JavaScript.
REFERENCE:
Dandan Li , Jiaxing Xia , Jiangfeng Li , Changjiang Xiao , Vladimir Stankovic , Senior Member, IEEE, Lina Stankovic , and Qingjiang Shi, “A Temporal–Spatial Graph Network With a Learnable Adjacency Matrix for Appliance-Level Electricity Consumption Prediction” IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 6, NO. 4, APRIL 2025.
👉CLICK HERE TO BUY THIS PROJECT “Optimized Electricity Bill Prediction Using Machine Learning Techniques” SOURCE CODE👈
Frequently Asked Question (FAQ’s) & Answers:
1. What is the main objective of this project?
The primary objective is to predict monthly electricity bills based on household appliance usage, usage hours, tariff rates, and other relevant parameters using machine learning models like Random Forest Regressor and Stacking Regressor.
2. Which technologies are used in this project?
The project is developed using Python for backend processing, Flask as the web framework, and HTML, CSS, and JavaScript for the frontend interface.
3. What machine learning algorithms are implemented?
Two regression models are implemented: • Random Forest Regressor, which achieved a training MAE of 0.55 and a test MAE of 1.32. • Stacking Regressor, which achieved a training MAE of 0.82 and a test MAE of 1.50.
4. What type of dataset is used in this project?
The dataset contains 45,345 records with features such as the number of appliances (Fan, Refrigerator, AirConditioner, etc.), Month, City, Company, MonthlyHours, TariffRate, and the target variable: ElectricityBill.
5. What preprocessing steps are applied to the dataset?
The dataset is preprocessed using: • Label Encoding for converting categorical features (e.g., City) into numeric form. • Feature Removal to drop irrelevant features (e.g., Company). • Feature-Target Split to divide the dataset into independent variables and the target output.
6. Is the system web-based or standalone?
The system is fully web-based. It allows users to enter data through a browser interface and view real-time predictions and visualization outputs.
7. Can this system work without smart meters or time-series data?
Yes. The system is designed to work on monthly aggregated data and does not require real-time or high-frequency appliance-level usage data.
8. What visualizations are included in the project?
The system provides several data visualizations, including: • Model Performance Comparison – Mean Absolute Error (MAE) • Average Appliance Usage (Hours) • Monthly Average Electricity Bill • Top 5 Cities by Average Electricity Bill • Top 5 Companies by Average Electricity Bill • Feature Correlation with Electricity Bill • Monthly Average Electricity Bill Chart • Electricity Bill by City Chart • Plot for Electricity Bill Chart • Monthly Electricity Bill Analysis Chart These help users interpret usage behavior and cost impact.
9. Who can benefit from using this system?
This system is beneficial for: • Households to estimate and manage electricity costs • Utility companies for demand prediction and customer engagement • Energy auditors and consultants for billing analysis and planning
10. Can this system be expanded or customized?
Yes. The system has a modular architecture and can be enhanced to include more appliances, integrate real-time data from IoT devices, support dynamic tariff models, or provide energy-saving suggestions.
11. How accurate are the predictions?
The system achieves high accuracy with low mean absolute errors. The Random Forest model, for example, has a test MAE of just 1.32, making the predictions reliable for general billing purposes.
12. Is any user data stored?
No personal or confidential data is stored. The system is designed to work with non-identifiable electricity usage data and complies with data privacy standards.