Inspiration
Buildings are among the largest sources of energy-related emissions, and retrofitting the worst performers is one of the fastest ways to cut them. To find those buildings, you first need to know how much energy a building should use. The WiDS Datathon 2022 data gave us 75,757 building-years across 60 facility types and seven states. Reading the top Kaggle solutions taught us one thing: a building's own past is often the best clue to its future.
What it does
Our MATLAB pipeline predicts a building's annual site energy use intensity (EUI). If a building has earlier records, it starts from the building's most recent EUI and predicts how much it will change:
$$\hat{y}_{b,t} = y_{b,\text{latest}} + \hat{f}(\mathbf{x}_{b,t})$$
The 638 test buildings without any history use a 50/50 blend of LSBoost and a random forest:
$$\hat{y} = \tfrac{1}{2}\left(\hat{y}_{\text{LSBoost}} + \hat{y}_{\text{forest}}\right)$$
How we built it
Everything, from training to the final predictions, runs in MATLAB with the Statistics and Machine Learning Toolbox.
- Building history: the dataset has no building ID, so we match buildings on their raw state, building class, facility type, floor area and year built. We match before filling any gaps, so filled-in values can't create false matches. From each match we build eight history features, such as the latest EUI, the average of earlier years, the gap since the last record and the change in Energy Star rating.
- No peeking ahead: a row from year t only sees history from years before t. A synthetic test confirms that same-year and future values can't leak in.
- Validation over time: we train on years 1–3 to predict year 4, and on years 1–4 to predict year 5, then pool the errors:
$$\text{RMSE} = \sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(y_i - \hat{y}_i\right)^2}, \quad n = 31{,}254$$
- Comparing models: we tuned eight LSBoost settings and compared six model types.
| Model | Pooled RMSE |
|---|---|
| Tuned LSBoost (no history) | 41.82 |
| Random forest | 42.63 |
| Latest earlier EUI + fallback | 36.19 |
| LSBoost + history, predicting EUI directly | 35.23 |
| LSBoost + history, predicting the change | 34.93 |
Building history cut the error by 16.5% compared with the tuned baseline. Retrained on all the data, our model scored public RMSE 19.545 / private RMSE 21.552 as a late Kaggle submission. That would sit just outside the top 50 of 829 teams on the final private leaderboard.
Challenges we ran into
- Matching without an ID: our matching key is a stand-in for a real building ID, not a guarantee, so we had to deal with duplicate rows and gaps between years.
- Leakage: history features can easily leak answers from the future, so we kept every step strictly backward-looking and tested that it was.
- Models that didn't work: our neural network hit its training-iteration limit (RMSE 96.5), and the kernel model didn't reliably converge. We report both honestly instead of hiding them.
- Honest test sets: year 6 had already been seen during feature experiments, so we don't claim it as an untouched test.
What we learned
- How a building has behaved before mattered more than any amount of model tuning.
- Predicting the change from last year worked better than predicting energy use directly.
- Validating over time is the only honest check when the test set is a future year.
- Reporting what failed is part of understanding the problem.
What's next
- Rank buildings by how far their actual energy use exceeds our prediction, to build a retrofit shortlist.
- Make the pipeline run on MATLAB Online and macOS, and launch it with a single command.
Built With
- chatgpt
- claude
- matlab
Log in or sign up for Devpost to join the conversation.