This project aims to create a predictive model for household energy consumption using historical data from smart meters and external factors such as weather conditions.
By leveraging the UCI Household Power Consumption Dataset and weather data from the Meteostat API, the model seeks to provide insights into energy usage patterns and assist in optimizing consumption.
- Energy Consumption Dataset: UCI Household Power Consumption Dataset
- Contains measurements of household energy consumption between December 2006 and November 2010.
- Weather Data: Collected from the Meteostat API, including temperature, precipitation, and other weather variables.
-
Energy Dataset Features:
- Date, Time, Global Active Power, Global Reactive Power, Voltage, Global Intensity, Sub-metering data.
-
Weather Dataset Features:
- Average Temperature, Minimum and Maximum Temperature, Total Precipitation, Snow Depth, Wind Speed, Sea-Level Pressure.
- Python 3.x
- Libraries:
numpy
,pandas
,matplotlib
,seaborn
,sklearn
,ydata_profiling
,meteostat
- Cleaning: Handling missing values and formatting datetime.
- Feature Engineering: Creating lag features, interaction features, and seasonal indicators.
- Merging Datasets: Combining energy and weather datasets based on datetime.
- Model Used: Linear Regression
- Evaluation Metrics: RMSE, MAE, R-squared
- The model achieved a high R-squared value of 99.86%, indicating excellent predictive accuracy.
Visualizations include:
- Time series plots of global active power.
- Distribution analysis of energy consumption.
- Correlation heatmaps and seasonal consumption trends.
For viewing the profiling of data use the link:
Household Energy Consumption Profile Report
- Integration with IoT Devices: Expand the model to capture real-time data from smart home devices to improve accuracy and optimization of energy use.
- Predictive Maintenance: Identify patterns that signal potential equipment failures, enabling proactive maintenance to enhance efficiency.
- Clone the repository:
git clone https://github.com/snehapadgaonkar/Household-energy-consumption-prediction.git cd final
- Load the Dataset: Ensure you have the dataset in the specified location or update the path in the notebook.
- Install the required libraries:
pip install -r requirements.txt
- Run the Notebook: Open the Jupyter Notebook and follow the steps for data preprocessing, feature engineering, and model evaluation.
This project effectively utilizes machine learning to forecast household energy usage, achieving high accuracy with a 99.86% R-squared value.
By integrating historical data and weather factors, it provides actionable insights for optimizing energy consumption.