Testing Multiple Regression Models to Predict Energy Efficiency of Buildings.
Multiple linear regression establishes the relationship between the target variable and the predictors (usually two or more). In reality, several factors contribute to a certain outcome as opposed to just one as suggested by simple linear regression. Multiple linear regression has similar assumptions as simple linear regression and also assumes that there is no significant correlation between the predictors. While the relationship between variables can be linear, it allows for non-linear relationships that are not straight lines.
The dataset is Appliances Energy Prediction data. The data is time series data at 10 min intervals for about 4.5 months. The house temperature and humidity conditions were monitored with a ZigBee wireless sensor network. Each wireless node transmitted the temperature and humidity conditions around 3.3 min. Then, the wireless data was averaged for 10 minutes periods. The energy data was logged every 10 minutes with m-bus energy meters. Weather from the nearest airport weather station (Chievres Airport, Belgium) was downloaded from a public data set from Reliable Prognosis (rp5.ru), and merged together with the experimental data sets using the date and time column.
Two random variables have been included in the data set for testing the regression models and to filter out non predictive attributes (parameters). The attribute information can be seen below.
Feature Name | Description | Data Type |
---|---|---|
date | year-month-day hour:minute:second | datetime64[ns] |
Appliances | energy use in Wh | int64 |
lights | energy use of light fixtures in the house in Wh | int64 |
T1 | Temperature in kitchen area, in Celsius | float64 |
RH_1 | Humidity in kitchen area, in % | float64 |
T2 | Temperature in living room area, in Celsius | float64 |
RH_2 | Humidity in living room area, in % | float64 |
T3 | Temperature in laundry room area | float64 |
RH_3 | Humidity in laundry room area, in % | float64 |
T4 | Temperature in office room, in Celsius | float64 |
RH_4 | Humidity in office room, in % | float64 |
T5 | Temperature in bathroom, in Celsius | float64 |
RH_5 | Humidity in bathroom, in % | float64 |
T6 | Temperature outside the building (north side), in Celsius | float64 |
RH_6 | Humidity outside the building (north side), in % | float64 |
T7 | Temperature in ironing room , in Celsius | float64 |
RH_7 | Humidity in ironing room, in % | float64 |
T8 | Temperature in teenager room 2, in Celsius | float64 |
RH_8 | Humidity in teenager room 2, in % | float64 |
T9 | Temperature in parents room, in Celsius | float64 |
RH_9 | Humidity in parents room, in % | float64 |
T_out | Temperature outside (from Chievres weather station), in Celsius | float64 |
Press_mm_hg | Pressure (from Chievres weather station), in mm Hg | float64 |
RH_out | Humidity outside (from Chievres weather station), in % | float64 |
Windspeed | Wind speed (from Chievres weather station), in m/s | float64 |
Visibility | Visibility (from Chievres weather station), in km | float64 |
Tdewpoint | Tdewpoint (from Chievres weather station), in °C | float64 |
rv1 | Random variable 1, nondimensional | float64 |
rv2 | Random variable 2, nondimensional | float64 |
You need to have Python 3
on your system. Then you can clone this repo and being at the repo's root :: repository_name> ...
- Clone this repository:
git clone https://github.com/Azie88/Regression-Energy-Data
- On your IDE, create A Virtual Environment and Install the required packages for the project:
-
Windows:
python -m venv venv; venv\Scripts\activate; python -m pip install -q --upgrade pip; python -m pip install -qr requirements.txt
-
Linux & MacOs:
python3 -m venv venv; source venv/bin/activate; python -m pip install -q --upgrade pip; python -m pip install -qr requirements.txt
The two long command-lines have the same structure. They pipe multiple commands using the symbol ;
but you can manually execute them one after the other.
- Create the Python's virtual environment that isolates the required libraries of the project to avoid conflicts;
- Activate the Python's virtual environment so that the Python kernel & libraries will be those of the isolated environment;
- Upgrade Pip, the installed libraries/packages manager to have the up-to-date version that will work correctly;
- Install the required libraries/packages listed in the
requirements.txt
file so that they can be imported into the python script and notebook without any issue.
NB: For MacOs users, please install Xcode
if you have an issue.
- Explore the Jupyter notebook for detailed steps and code execution.
Andrew Obando
Feel free to star ⭐ this repository if you find it helpful!