Baseline AI forecasts hourly electricity use from weather, calendar and meter history. When a building uses more than it should, it flags the waste. After a retrofit, it measures the real savings. Trained and tested on 591 real buildings.
What Baseline AI does, and why it matters, in under two minutes.
591
real buildings on 4 campuses, 14 building types
9.2M
hourly meter readings, 2016–2017
13.8%
median day-ahead error (CV-RMSE) on unseen months
40%
less error than the "same hour last week" baseline
Why it matters
Buildings are the largest energy user nobody watches hour by hour.
Most buildings get a monthly bill, not a benchmark. Without knowing what a building should have used, waste stays invisible and efficiency gains stay unproven. Baseline AI gives every metered building that benchmark, automatically.
Hidden
A monthly bill shows how much a building used, not how much it should have used. Night-time waste and failing equipment disappear into the total.
Unproven
Efficiency projects promise savings, but few are measured afterwards with a fair, weather-adjusted baseline. Funders cannot tell what worked.
Unscaled
Engineering energy models need weeks of expert work per building. Cities and national programmes manage thousands of buildings.
Building owners and facility teams
Find waste in days, not at the end of the year
Each day, actual use is compared with what the weather and calendar explain. Equipment left running at night, failed HVAC schedules and stuck valves show up as red days on a chart.
Tested by injecting faults into real meters: 74% of +50% fault days and 55% of +30% fault days caught, with 3.6% of normal days flagged.
Energy service companies, banks, green funds
Prove savings with a weather-adjusted baseline
After a retrofit, the model predicts what the building would have used without it. The gap is the saving, corrected for weather and calendar, following standard measurement and verification (M&V) practice.
Over three months, a known 15% saving was measured within 10 points in 65% of 591 buildings (median error 6.7 points). Best suited to retrofits with large savings.
Utilities and grid operators
Plan tomorrow's demand, building by building
Day-ahead hourly forecasts add up to campus and feeder load. Knowing the peak in advance makes demand response possible: pre-cooling, shifting loads, and freeing room on the grid for solar and wind.
88% of buildings meet the standard hourly accuracy limits for building energy models (CV-RMSE ≤ 30%, |NMBE| ≤ 10%) with the day-ahead model.
Governments and international agencies
Track efficiency progress across whole building stocks
The same model runs on thousands of buildings from meter and weather data alone. Cities and agencies can benchmark portfolios, target the worst performers and measure policy impact with real data instead of estimates.
One model covers all 591 buildings and 14 building types; no per-building engineering model is needed.
Engineering simulation
Weeks of expert work per building
Physics-based simulation tools need geometry, materials and HVAC details for each building. Accurate, but too slow and costly for a national building stock.
Baseline AI
Minutes for a whole portfolio
Learns each building's behaviour from its own meter and local weather. Adding a building adds no engineering cost, so it scales from one campus to a country.
Results
Tested on six months the models never saw.
All models train on January 2016 to June 2017 and are scored on July to December 2017. Errors are measured per building with the standard energy metrics, then summarized by the median building.
Median error by model (CV-RMSE, lower is better)
Test period Jul–Dec 2017 · 591 buildings · bars in green are the AI models used by the platform
Validation of the applications
Controlled experiments on real test data
88%
Buildings within the standard accuracy limits for hourly building energy models (CV-RMSE ≤ 30%, |NMBE| ≤ 10%) with the day-ahead model.
74%
Fault days detected. A +50% fault was added for 5 days in 100 random buildings; 55% of smaller +30% faults are caught. 3.6% of normal days are flagged.
65%
Savings measured within 10 points of a known 15% saving, three months after a simulated retrofit. The baseline model is retrained on all data before the retrofit, as standard M&V practice recommends.
Error across all buildings (day-ahead model)
Number of buildings by CV-RMSE · dashed line = 30% hourly accuracy limit
Error by building type (day-ahead model)
Median CV-RMSE per type, most common types first
Type
Buildings
CV-RMSE
Method
From raw meter files to an explainable forecast.
Six steps, all in open Python code. The pipeline runs end to end with one command on a laptop in about half an hour.
Collect
An open dataset of hourly electricity meters from 591 university buildings on four campuses, plus local temperature and humidity.
src/download.py
Clean
Remove non-positive readings, frozen meters (identical for 24+ hours) and spikes. Merge each meter with its site's weather.
src/data.py
Engineer features
Calendar and holidays, dew point, heating and cooling degree hours, rolling temperature, each building's typical weekly profile and recent level, and past consumption.
src/features.py
Train and compare
Two baselines, Ridge regression, Random Forest and gradient-boosted trees (LightGBM), tuned on validation months only.
src/train.py
Explain
SHAP values show how temperature, time of day and building history move each prediction, so engineers can check the model's reasoning.
src/explain.py
Act
Flag anomalous days, verify savings after retrofits, and publish everything in an interactive dashboard.
src/anomalies.py
Model 1 · weather model
How much should this building use?
Knows the building, the weather and the calendar, but not recent meter readings. Its forecast is a fair benchmark of normal behaviour.
Detects waste and faults
Measures retrofit savings (M&V)
Benchmarks buildings against themselves
Model 2 · day-ahead model
How much will this building use tomorrow?
Adds consumption up to the previous day. More accurate, because it tracks each building's latest behaviour.
Plans energy purchases and demand
Anticipates peaks for demand response
Feeds grid and campus load forecasts
Strict time split
Training ends on 30 June 2017. Nothing from the test months is used for training, tuning or features.
No leakage
Building profiles are learned from the training period only. Lag features use data at least 24 hours old.
Fair examples
The platform shows buildings at the 25th, 50th and 75th percentile of error for each type, not the best cases.
Standard metrics
CV-RMSE and NMBE, the reference measures for building energy models, plus RMSLE, MAE and MAPE.
Pick a building and look at what the models predicted for July to December 2017, months they never saw. Everything below runs on the published model outputs.
—
MeteredDay-aheadWeather model
Day-ahead CV-RMSE
—
Weather model CV-RMSE
—
Window energy, metered
—
Window energy, forecast
—
CV-RMSE values cover the whole test period for this building. Energy totals cover the selected window.
Normal dayAnomalous dayExpected use (weather model)
Anomalous days
—
Events
—
Energy above expected
—
Share of test days
—
Event
Days
Above expected
Extra kWh
Expected use is the weather model, re-calibrated on the building's previous four weeks (ending a week earlier, so a fault cannot hide itself). A day is flagged when use is at least 15% above expectation and an outlier for that building (median + 2.5 robust standard deviations).
15%
Expected without retrofitMetered with retrofit
True saving
—
Measured by the model
—
Measurement error
—
Energy saved
—
The saving is simulated by reducing the real meter data after the chosen date. This interactive version calibrates the weather model on the 8 weeks before the retrofit with one factor. The validated method in the code goes further and retrains the baseline model on all data up to the retrofit date.
Average absolute SHAP value over 20,000 test hours from all buildings, in log-kWh. Longer bars mean the feature moves forecasts more.
Use it
Run it on your laptop, then on your own buildings.
Free and open source. You need Python 3.10 or newer and about 4 GB of free memory. No GPU or hardware is required.
Get the code
Clone the repository and install the dependencies.
git clone https://github.com/ouahab4/baseline-ai
cd baseline-ai
pip install -r requirements.txt
Run the pipeline
Downloads the data, trains the models, explains them and runs the validation tests.
./run_all.sh # about 30 minutes on 4 CPU cores
Open the dashboard
Forecasts, anomalies, SHAP explanations and the savings calculator for every building.
streamlit run app/dashboard.py
Bring your own meters
Export hourly data to one CSV with these columns, then run the importer and the same pipeline.
At least 12 months of hourly data per building is recommended, so the model sees every season.
Research paper
The full method and results, in one paper.
Data, cleaning rules, features, models, validation protocol, every result table and the limits of the approach. Written so that another team can check and reproduce the work.
Research paper · PDF
Baseline AI: Explainable Machine Learning for Hourly Building Energy Forecasting, Waste Detection and Savings Verification
We present Baseline AI, an open-source system that predicts the hourly electricity use of buildings from weather, calendar and meter history, and uses those predictions to find energy waste and verify retrofit savings. On 591 real buildings and six unseen months, the day-ahead model reaches a median CV-RMSE of 13.8%, 40% below a seasonal baseline, and 88% of buildings meet standard hourly accuracy limits.
Krim, A. Baseline AI: Explainable Machine Learning for Hourly Building Energy Forecasting, Waste Detection and Savings Verification. COMPILIX INNOVATIONS, SPASU BAC Students, Algeria.
About
Built by COMPILIX INNOVATIONS.
COMPILIX INNOVATIONS is the research lab of SPASU BAC Students, a technology education company based in Algeria. The lab designed, developed and built Baseline AI, from data engineering to the models, the validation studies and this platform.
Research lab
COMPILIX INNOVATIONS
Applied AI research with open, reproducible code. Baseline AI is the lab's project for energy efficiency in buildings.
Company
SPASU BAC Students
A technology education company based in Algeria, and the home of COMPILIX INNOVATIONS.
Lead researcher
Abdelouahab KRIM
Author of the Baseline AI research paper and lead developer of the system.