Lesson 6.3Lesson 6.3 · Analytics & AI
Machine Learning for Buildings
Where ML genuinely helps - forecasting, anomaly detection, pattern discovery - and where it is oversold against a simple rule
In smart buildings, machine learning is both genuinely useful and wildly oversold - often in the very same sales deck.
No phrase sells a building product like AI. Yet strip away the branding and much of what is labelled machine learning in this field is a threshold rule with a marketing budget - while some of the most valuable ML runs quietly in the background with no badge at all. The skill this lesson builds is telling the two apart.
Machine learning is learning patterns from data instead of being told the rules. That is a real and powerful capability, and in buildings it earns its keep in a few specific places: forecasting loads and occupancy, detecting anomalies nobody wrote a rule for, and discovering patterns in data too large to eyeball. We will look honestly at each - and, just as importantly, at the many places where a simple rule is faster, cheaper, more trustworthy and simply better.
AI is the best-selling word in this field. Ask: rule enough? data there? decision served?
What machine learning actually is - supervised and unsupervised
Machine learning is the practice of learning a pattern from data rather than hand-coding a rule. You show an algorithm examples, and it fits a model that generalises to new cases. In buildings, two flavours cover most of the ground. Supervised learning learns from labelled examples: give it historical inputs paired with the answer - weather and calendar paired with the energy that resulted - and it learns to predict the answer for new inputs. Forecasting is the classic supervised task. Unsupervised learning works with no labels: it finds structure on its own - clustering similar days, similar zones or similar load shapes, or flagging the points that do not fit any cluster. Anomaly detection and pattern discovery are its home turf.
The distinction matters practically because buildings rarely come with labels. Almost nobody has a tidy dataset of here are a thousand examples of a leaking valve. That scarcity of labelled faults is why unsupervised anomaly detection - learn what normal looks like, flag the abnormal - is often the realistic first step in a building, while richly supervised approaches are easier for things you can label cleanly, like metered energy against weather. Knowing which flavour a problem needs tells you immediately whether you even have the data to attempt it.
There is a spectrum in between worth naming, because vendors blur it. Semi-supervised methods learn mostly from unlabelled data with a few labels to guide them; reinforcement learning, much hyped for building control, learns by trial and reward and is genuinely hard to apply safely in a real building where you cannot experiment freely on people's comfort. For most practical building work, though, the honest supervised-versus-unsupervised split is enough to reason with - and enough to ask the one question that cuts through a sales pitch: what is this model learning from, and do we actually have that data? If the answer is a labelled history the building has never collected, the impressive demo will not survive contact with your building.
Supervised = learn from labelled answers. Unsupervised = find structure with no labels. Buildings mostly lack labels.
Where ML genuinely helps - forecasting, anomaly detection, pattern discovery
Three uses stand out as consistently worth it. Forecasting is the strongest: predicting a building's electrical load, heating and cooling demand, or occupancy for the hours and days ahead. A good load or occupancy forecast is the fuel for smarter control - pre-cooling before a demand peak, staging plant ahead of an occupied morning, participating in demand response. It is genuinely hard to do well with a fixed rule because it depends on weather, calendar, occupancy and the building's own quirks all at once, which is exactly what a learned model handles.
Anomaly detection is the second: learning the normal envelope of a meter, a runtime or a temperature and flagging what falls outside it - often the first hint of a fault, a leak or a change in use, including faults no rule anticipated. Pattern discovery is the third: clustering thousands of days or zones to reveal groupings a human would never spot - which zones behave alike, which days are truly abnormal, how the building's signature shifts across seasons. Notice the common thread: ML earns its place where the pattern is genuinely complex, multivariate, or unknown in advance - precisely where a rule runs out of road.
Where ML is oversold - and the trap of the black box
Now the honest half. A great deal of building ML is oversold, and recognising the pattern protects you. First, simple rules often win: catching simultaneous heating and cooling, plant left running at night, or a temperature out of range needs a threshold, not a neural network - and the rule is faster, cheaper, explainable and does not need training data. Reaching for ML here adds cost and opacity for no benefit. Second, ML needs data you may not have: models are only as good as their history, and a building with drifting sensors, gaps, or only a few months of records cannot support a trustworthy model - garbage in, confident-looking garbage out.
Third, and most dangerous, is the black box. A model that flags an anomaly but cannot say why, in a domain where operators must trust and act on it, often gets ignored - killing the very value it promised. In buildings, explainability is not a luxury; an alert an engineer cannot interrogate is an alert they will mute. And beware the deepest trap: a model can be accurate and useless at once if its output serves no decision. The professional test is unchanged from lesson one - what decision does this serve, is a rule enough, and do we have the data and the trust to act on the output? If ML clears that bar, use it. If it does not, the simpler tool is the smarter one.
ML oversold when: a rule would do, the data is not there, or the output is a black box no one acts on.
Using ML responsibly in a building
If a problem genuinely calls for machine learning, a few disciplines keep it honest. Start from the decision, not the algorithm: name the action the forecast or anomaly flag will drive before you build anything. Baseline against a simple rule: if a threshold or a linear fit does nearly as well, ship that instead - simplicity is a feature. Insist on clean, well-tagged data: the metadata schemas from the last lesson, Brick and Haystack, are what let a model be trained once and deployed across many buildings without hand-wiring every point. Report honest error: a forecast without an error band is a guess wearing a suit; a model that is wrong in new conditions must fail visibly, not silently.
And keep a human in the loop where stakes are real. ML in buildings is at its best as an assistant to judgement - surfacing the forecast, the anomaly, the cluster - not as an unaccountable autopilot, especially for anything touching safety, security or occupant wellbeing, where statutory sign-off stays with qualified professionals. Used this way, machine learning is a genuinely valuable member of the analytics toolkit. Used as a magic word, it is an expensive way to make a chart look clever. The difference is entirely in the judgement you bring to it - which is the thing no model can supply.
A worked example: a forecast that pays for itself
Take the strongest use - forecasting - and make it concrete. A retail building is on a tariff with demand charges: a large slice of the monthly bill is set by the single highest half-hour of electrical demand, which for this building lands on hot afternoons when the cooling plant runs flat out just as shoppers pack in. Shaving that peak is worth real money, but you can only shave a peak you can see coming. A fixed rule cannot: the peak depends on tomorrow's weather, the day of the week, a promotion, and the building's own thermal quirks, all interacting.
This is where a supervised load forecast earns its place. Trained on history - past load paired with weather and calendar - the model predicts tomorrow's demand curve, peak and all. That forecast then drives an action: pre-cool the building in the cooler morning hours so its thermal mass carries it through the afternoon with the plant backed off during the costly window, and stage equipment ahead of the ramp rather than scrambling to catch it. The saving is measurable on the demand charge.
Notice what makes this legitimate ML rather than theatre. The forecast serves a specific decision (when to pre-cool, how hard); a rule genuinely could not express the multivariate pattern; the building has the metered history to train on; and the output comes with an honest error band, so operators know how much to trust it and a human stays in the loop. It also sits right on the border of the next module's territory - model predictive control, where such forecasts feed an optimiser that plans the building's moves automatically. Good forecasting is the bridge from analysing a building to actively, intelligently running it.
Forecast the afternoon peak -> pre-cool in the cheap morning -> shave the demand charge. A rule cannot see weather coming.
Supervised learning
Learn from labelled examples
Inputs paired with answers - weather and calendar with metered energy. The basis of forecasting. Needs labels.
Unsupervised learning
Find structure with no labels
Clustering and anomaly detection. Often the realistic first step in buildings, which rarely have labelled faults.
Load / occupancy forecasting
Predicting demand or occupancy ahead
The strongest, best-proven building ML use; fuel for smarter, predictive control.
Anomaly detection
Flagging what departs from learned normal
Catches faults and changes no rule anticipated; the value depends on low false alarms and explainability.
Explainability
A model that can justify its output
In buildings an alert an operator cannot interrogate gets muted; explainability is a practical requirement, not a nicety.
Workshop — decide: rule, model, or neither?
The single most useful ML skill in buildings is not coding a model - it is deciding whether a problem needs one at all. You will take a set of real building problems and make that call, with reasons.
The problem list and a notebook. Optional: a spreadsheet of any building or energy time-series to try a simple forecast or moving-average anomaly check by hand.
Goal: build the judgement to tell genuine ML value from AI theatre Inputs: the problem list below and a notebook Time: ~30 minutes
- 1Take five building problems: (a) flag simultaneous heating and cooling, (b) forecast tomorrow's cooling load, (c) detect an unusual overnight energy pattern, (d) alarm when a room passes 28 C, (e) group 300 zones by how they behave. For each, decide: simple rule, machine learning, or neither?
- 2For each ML choice, state whether it is supervised or unsupervised, and what data (and labels) you would need. Be honest where the data probably would not exist.
- 3For each rule choice, write the rule in plain if / then form and explain why a model would add cost without benefit.
- 4Pick the one problem where ML is most clearly justified and name the exact decision its output would drive - if you cannot name a decision, reconsider whether it is worth building.
- 5Now play sceptic: for a vendor claim of our AI optimises your building automatically, list three questions you would ask to test whether it is genuine value or theatre.
You’ll walk away with
A decision table for the five problems (rule / ML / neither, with reasoning and data needs), plus three sharp questions to put to any AI building-product vendor.
Three altitudes on the same idea
Read the band that fits you — or all three.
ML rewards buildings designed to be measured. Load and occupancy forecasting - the most valuable building ML - needs clean, continuous data from sensible metering and occupancy sensing, decisions made at design time. You will rarely build the models yourself, but designing a building that produces trustworthy, well-structured data is what makes any of this possible, and it lets you cut through vendors selling AI where a rule would do.
Occupancy and comfort patterns are where ML touches your work. Learned occupancy forecasts drive how spaces are conditioned and lit before people arrive; clustering reveals how rooms are really used versus how they were meant to be. Understanding what ML can and cannot infer helps you design responsive interiors - and stay sceptical of products promising the space will magically learn the occupants.
This is where your data skills meet real buildings - and where judgement beats jargon. If you can code a forecast or an anomaly detector you are valuable; if you can also say honestly when a rule is the better answer, you are rare. Employers are tired of AI theatre. Learn the genuine uses, the supervised-versus-unsupervised idea, and the discipline of baselining against simple methods.
“Give a building enough machine learning and it will teach itself to run optimally with no rules and no engineers.”
Do it yourself
Judgement first, algorithms second.
- 1In one sentence, what distinguishes supervised from unsupervised learning?
- 2Why is unsupervised anomaly detection often the realistic first ML step in a building?
- 3Name the three uses where ML most clearly earns its place in buildings.
- 4Give two situations where a simple rule beats machine learning.
- 5Why can a model be accurate and still useless?
The one line to carry out
Peer-reviewed journals & authoritative standards
- 01Machine learning — Wikipedia, 2026.
- 02Predictive analytics — Wikipedia, 2026.
- 03Predictive maintenance — Wikipedia, 2026.
- 04Digital twin — Wikipedia, 2026.
Forecasting and anomaly detection point squarely at energy - the biggest prize of all. Next we make it concrete with energy analytics and benchmarking: energy use intensity, comparing against peers, reading load profiles, and proving savings are real.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →