Building Energy Consumption Prediction
Python, Machine Learning, Scikit-learn, Pandas, NumPy, EDA, Feature Engineering, Régression, GridSearchCV, Data Visualization
Prediction of Building Energy Consumption
Context
As part of a Data Science project, I developed a Machine Learning model to predict the energy consumption of non-residential buildings in the city of Seattle based on their structural characteristics.
The objective was to propose a solution capable of estimating the consumption of buildings for which no measurements were available, in order to support carbon emission reduction policies.
Objectives
- Perform an exploratory data analysis (EDA).
- Clean and prepare the data.
- Design new variables (Feature Engineering).
- Compare several regression models.
- Optimize the best model.
- Identify the factors with the most influence on predictions.
Architecture
Dataset Seattle Buildings
│
▼
Exploratory Analysis (EDA)
│
▼
Data Cleaning
│
▼
Feature Engineering
│
▼
Data Preparation
(Encoding, Scaling)
│
▼
Comparison of several models
│
▼
Optimization (GridSearchCV)
│
▼
Predictions + Feature Importance
Technologies Used
- Python
- Pandas
- NumPy
- Matplotlib
- Scikit-learn
- Jupyter Notebook
Achievements
Exploratory Analysis (EDA)
- Study of data quality.
- Analysis of distributions.
- Identification of outliers.
- Analysis of correlations.
- Visualization of main building characteristics.
Data Preparation
- Handling missing values.
- Removal of inconsistent data.
- Encoding categorical variables.
- Normalization of numerical variables.
- Constitution of training and test sets.
Feature Engineering
Creation of new variables to improve model performance:
- temporal characteristics (year of construction, age)
- building uses
- structural variables
- category grouping
- reduction of data leakage risk
Modeling
Comparison of several supervised regression models:
- Linear Regression
- Random Forest Regressor
- Decision Tree Regressor
- Gradient Boosting Regressor
Model evaluation using cross-validation to select the best performing one.
Optimization
- Hyperparameter search with GridSearchCV
- Cross-validation
- Selection of the best model
Interpretation
Analysis of variable importance to identify the main factors influencing building energy consumption.
Demonstrated Skills
Data Science
- Exploratory Analysis (EDA)
- Data Cleaning
- Data Visualization
- Feature Engineering
- Outlier Detection
Machine Learning
- Supervised Regression
- Cross-validation
- Model Evaluation
- Hyperparameter Optimization
- Data Leakage Prevention
Python Development
- Data Manipulation
- Preparation Pipelines
- Jupyter Notebook
- Results Visualization
Business Analysis
- Understanding energy challenges
- Interpretation of explanatory variables
- Presentation of results to a business audience
Outcome
This project allowed me to implement the entire lifecycle of a Machine Learning project, from data analysis to the optimization and interpretation of a predictive model, while applying best practices for data preparation and performance evaluation.
Skills Acquired
- Python
- Pandas
- NumPy
- Scikit-learn
- Machine Learning
- Regression
- Data Science
- Feature Engineering
- Data Cleaning
- Data Visualization
- EDA
- GridSearchCV
- Cross Validation
- Random Forest
- Gradient Boosting
- Decision Trees
- Linear Regression
- Feature Importance
- Jupyter Notebook