Inspiration
Buildings are major contributors to global energy use and carbon emissions. If we can predict how much energy a building will use, organisations can find high-use buildings and target them for upgrades, such as retrofitting. We wanted to see how well a machine learning model could do this from building characteristics, location and weather.
What it does
Our MATLAB project predicts each building's site EUI (energy use intensity, or energy per square foot) and compares three regression models: linear regression, a decision tree and boosted trees.
How we built it
Data: 75,757 labelled buildings from years 1 to 6 for training, and 9,705 unseen buildings from year 7 to predict.
Preparation:
- Separated the label (
site_eui) from the predictors, and droppedidandYear_Factor. - Turned text columns into categories, and treated a build year of 0 as missing.
- Filled missing values with the training median, which is robust to extreme values and leaks nothing from the test data. We also added "was missing" flags so the models keep that signal.
- Standardised the numbers for the linear model, using training data only.
Validation: The real test set is a future year, so we trained on years 1 to 5 and validated on year 6 instead of using a random 80/20 split. This copies the real task and avoids over-optimistic scores from near-duplicate buildings appearing in both sets.
Models compared: linear regression, a decision tree, and boosted trees (300 trees, fitrensemble with LSBoost).
Results
Scores on year 6 (RMSE: lower is better; R²: higher is better):
| Model | RMSE | R² |
|---|---|---|
| Guess the average (baseline) | 57.2 | n/a |
| Linear regression | 56.4 | 0.02 |
| Decision tree | 45.2 | 0.37 |
| Boosted trees | 40.5 | 0.49 |
Boosted trees cut the error by about 29% compared with guessing the average. The most important predictors were [fill in from the importance chart].
Challenges
- Many columns had missing values, and the test set is missing even more wind and fog values than the training set, so median filling is a weak choice for those columns.
- Linear regression barely beat the baseline. Energy use depends on combinations of factors, like facility type and climate, which a straight-line model can't capture.
- Validating on a future year gave lower, but more honest, scores than a random split would have.
What we learned
Tree-based models capture interactions that linear models miss, and how you validate matters as much as which model you pick.
What's next
Test dropping the mostly-missing wind and fog columns, tune the boosted trees, try a log transform of the label, and use cross-validation across several years.
Built With
- decision-trees
- linear-regression
- machine-learning
- matlab
- regression
- statistics-and-machine-learning-toolbox
Log in or sign up for Devpost to join the conversation.