In today’s world, the optimization of energy consumption is crucial to reducing costs and minimizing environmental impact. As resources become scarcer, the efficient use of energy has become an urgent need for individuals and businesses. By optimizing energy use, consumers can maintain performance while reducing expenses, contributing to economic, political, and environmental sustainability.
Key Needs for Optimization
To optimize energy consumption effectively, the following needs must be addressed:
- Analyze the relationship between variables and their impact on energy use.
- Identify consumption patterns in specific environments.
- Correlate environmental measurements (e.g., temperature, humidity) with consumption data.
- Determine actionable steps to optimize energy use.
Initial Data
The analysis is based on a database covering energy consumption and costs from January to May 2016 in a two-story house with nine rooms. Key data points include:
Outdoor conditions: atmospheric pressure, wind speed, and visibility.
Indoor conditions: temperature, humidity, and appliance consumption.

Project Scope
The goal is to build analytical models that identify predictors influencing energy consumption. These models help achieve actionable insights, such as:
- Understanding how internal and external variables affect energy use.
- Visualizing costs and identifying savings opportunities.
- Simulating consumption behavior in different housing scenarios.
For instance, visibility data can guide the implementation of solar panels, reducing energy expenses. Descriptive dashboards, combined with predictive models, allow for tailored recommendations to optimize energy use in various building types.

Work performed(Data processing)
The data to be processed were obtained from the client’s own database. The following fields were available:


After obtaining the data from the client, the data normalization process was started, which consisted of:
Changing the format of the data.
Applying the hourly rate discrimination in the electricity expense, in order to obtain the expense in euros of the electricity (light) and appliances (appliances).

Data processing
Creation of histograms and graphs

Descriptive modeling
Once the data had been normalized, the visualization of the data began.
Different alternatives were used to visualize the data.
Qlik View
Power BI

Comparisons were made of total consumption as a function of temperature and humidity inside and outside the building. Not only was this comparison made, but the descriptive model also compared the consumption of the building with the other variables.
Dew temperature
Wind speed
Visibility
Pressure
…

Predictive modeling
Once the business is understood and the descriptive visualization of what the data showed us is done, a predictive modeling is performed to determine how the external and internal variables influence the model, an analysis is performed in R Studio, in order to:
Obtain the relationship between the variables.
Obtain the importance of the different variables.
Application of models such as GBM (Gradient Boosting Machine), RF (Random Forest)…

-Identification of predictors.
-Multi-variate analysis.
-Visualization.

Statistical analyses for the predictive model are performed with the following libraries and according to the variables available.
library(partykit)
library(gbm)
library(doParallel)
library(pROC)
library(corrplot)
library(psych)
library(Hmisc)
library(lubridate)


Results
Results of the models applied for the prediction of energy consumption.

Technology

Benefits of Predictive Modeling
By analyzing data, organizations can:
- Monitor building energy costs.
- Adjust consumption based on external and internal variables.
- Simulate and predict energy behavior to inform decisions.
- Implement energy-saving technologies tailored to specific environments.
Conclusion
The optimization of energy consumption relies on data-driven decisions. By learning from historical data, analyzing patterns, and leveraging predictive models, businesses and individuals can reduce costs, improve efficiency, and contribute to environmental sustainability. Technology solutions provide the tools needed to drive this transformation.
