
My background and purpose of course creation
By the end of this course, you will:
Build and test energy baselines that account for key influencing factors.
Predict and quantify energy savings with Machine Learning approaches.
Apply CUSUM analysis to turn complex data into clear, visual stories.
Observe load profiles by hour, day of week, season and look for opportunities to save energy.
Understand how high-frequency data is captured by modern meters, and why it matters.
Align your analysis with the globally recognized IPMVP Option C standard.
What is a Smart Meter?
How Data is Collected?
The Journey of Energy Data to the Cloud
Use multiple linear regression to link energy use with heating and cooling degree days and occupancy, build a baseline model, and estimate defensible insulation savings.
3.1 - An Intro MLR and ML
3.2 - Judge Baseline Model
3.3 - Weekly Average on an hourly basis - Weekday vs Weekend
3.4 - Monthly and Seasonal
3.5 - Recap - Load Profiles
3.6 - Create baseline Model
3.7 - RMSE-NMBE-CV(RMSE)
3.8 - NMBE Calculation
3.9 - Formula for RMSE and CV(RMSE)
3.10 - Compare it with ASRAE 14
3.11 - NMBE Formula
3.12 - Predicted Savings
3.13 - Savings - Weekday Vs. Weekend
3.14 - CUSUM calculation
3.15 - Conclusion
4.1 - Download and Install Anaconda
4.2 - Intro to Random Forest and Jupyter Notebook
4.3 - LOAD DATA using Pandas library
4.4 - Define dependent and independent variables
4.5 - Make the RF model and Predict 2022 Consumption
4.6 - RMSE and NMBE
4.7 - RF savings calculation
4.8 - Conclusion
Intro to XGBoost with an intuitive example
Introduce the XGBoost libraries and classes used to build energy models. Show how to import pandas as pd, numpy as np, XGB regressor, and metrics like mean_absolute_error, mean_squared_error, and r2_score.
Load and read the energy dataset in a Jupyter notebook, inspect features like floor area and climate_zone, and train an XGBoost model to predict total energy use intensity.
Encode the climate zone with one-hot encoding using get_dummies and drop_first to create binary features, then select x as input variables and y as total energy use intensity.
split the x and y data into 80 percent training and 20 percent test using scikit-learn's train_test_split with random_state 42, confirming shapes and 25 features from 2200 buildings.
Set up and train XGBoost regressor on building data, encoding climate zones and using an 80/20 train/test split. Evaluate with mean absolute error and R^2 for total energy use intensity.
Learn to predict energy use intensity for a new building with an XGBoost model, encoding climate zone, re-indexing features, and evaluating with mean absolute error, plus SHAP insights.
Explore SHAP interpretation to see how operating hours, insulation, and heat recovery efficiency influence energy use intensity per square meter in an XGBoost model, using SHAP values and summary plot.
What is NN and how many different types are there
Into to LSTM
LSTM Code Roadmap
Time series data of a building energy pattern
Create an LSTM project: set up a notebook, import pandas, numpy, minmaxscaler, minabsoluteerror, minsquareerror, rrsquarescore, and tensorflow keras layers; load a csv, preview data, and select x and y columns.
Import data, set X features and Y energy next hour, perform 80/20 train-test split, scale with min-max using fit_transform on training data and transform on test, then reshape for LSTM.
Creating sequences in lstm
NN setup using memory units and shape of training data
Compile an LSTM model with the Adam optimizer to minimize mean absolute error, train 25 epochs with a 32-sample batch and 20% validation, and reach 0.0534 MAE.
Use a trained LSTM model to predict the next hour energy from three-dimensional xtest data, apply inverse transform to the predictions, and compare them to actual kilowatt-hour values.
Increase model performance by extending LSTM training to 100 epochs with rd stop to minimize validation MAE. Compare r-square and MAE to confirm a better energy forecast model.
Analyze model errors by ranking absolute errors between actual and predicted energy, then use a random forest to identify which features—solar radiation, energy, outdoor temperature, occupancy, HVAC mode—drive the errors.
This lecture creates solar radiation levels and groups them into low, medium, high, computing error by group, showing overprediction at night and underprediction at high solar radiation; suggests time features.
Use an LSTM to predict the next hour energy by reshaping a new 24-point, 5-feature data row to three-dimensional, scaling with the same scaler, then inverse transforming to kilowatt hour.
Grey Box ML
Build a time-aware energy plus prediction pipeline by creating time features, selecting inputs like weather and occupancy, and using a gaussian process to correct the residual.
Explore a dataset of hourly energy plus predictions versus actual meter data, learn to compute residuals, and apply gray box machine learning with Gaussian processes to correct physics-based EnergyPlus predictions.
Load the hourly data set into a pandas data frame, convert timestamp to datetime, inspect columns and non-null values, and prepare time features for x and y.
Create time features and define X and y
Split the data into training and testing periods using a March 2026 cut-off, create train_df and test_df, and prepare x/y train and test sets to forecast energy use.
Train a gaussian process regression model with a standard scaler and kernel to learn residuals between energy plus predictions and meter data, delivering corrected kilowatt hours and 95% interval.
Train and apply a gray box model to correct energy plus predictions by estimating residuals with a Gaussian process, scaling new data, and delivering a corrected kilowatt-hour reading.
Explore z-score anomaly detection in energy analytics, using mean and standard deviation to flag abnormal electricity use. Learn workflow with pandas, NumPy, and Matplotlib to compare predicted vs real anomalies.
Load energy data in a jupyter notebook, explore anomaly types, convert timestamps to datetime, and compute the mean and standard deviation of kilowatt hours.
Calculate the mean and standard deviation of electricity kilowatt-hour values, create a z-score column, and identify anomalies when z-scores exceed three.
Use numpy to compute absolute z-scores, apply a threshold of 3, and mark z_score_anomaly to reveal potential energy anomalies for comparison with true counts.
Demonstrate z-score anomaly detection for building electricity use by plotting a timestamp versus electricity kilowatt hour with a scatter plot, labeling axes and adding a legend for detected anomalies.
Compute and interpret a confusion matrix for anomaly detection using z-score. The example reveals true positives, false positives, false negatives, and true negatives from real versus predicted anomalies.
Background Information of Isolation Forest
Use isolation forest to detect energy anomalies from a prepared dataset, including scaling and labeling, and compare results to z-score via a confusion matrix for energy managers.
Introduce autoencoders as neural network based anomaly detection that learns normal building patterns and flags anomalies with reconstruction error, a next advanced step beyond z-score and isolation forest.
Join this module to build a multiple linear regression model in Python, using SQL-prepared monthly energy data and features like cooling degree days, operating hours, and occupancy.
Join and Aggregate
This course teaches a practical building energy analytics workflow using Python and Excel. You will start with utility, weather, and building data, then learn how to clean the data, build energy baselines, estimate savings, detect unusual consumption, and communicate results clearly. Along the way, you will also apply practical machine learning models such as Multiple Linear Regression, Random Forest, XGBoost, and LSTM — always with one goal: making better building energy decisions.
You will learn how to work with smart meter data, weather data, building energy variables, and operational patterns to predict energy use, estimate savings, detect anomalies, analyze carbon impact, and support real engineering decisions.
Buildings are generating more data than ever through smart meters, HVAC systems, building automation systems, occupancy schedules, weather measurements, utility bills, and operational records. The challenge is no longer simply asking, “How much energy did the building use?” The real challenge is using that data to answer practical questions:
Can future building energy consumption be predicted?
Can retrofit savings be estimated and explained?
Can we identify which variables drive energy use?
Can hidden operational issues be detected automatically?
Can carbon reductions and cost savings be quantified clearly?
Can AI support better energy and decarbonization decisions?
This course was created to answer those questions using practical AI and machine learning methods designed specifically for building energy applications.
You will learn how to build weather-normalized baselines, estimate energy savings, support Measurement and Verification workflows, understand operational variables, and move beyond traditional spreadsheet-based analysis.
Machine learning methods covered include:
Multiple Linear Regression for baseline modeling and savings estimation
Random Forest for capturing nonlinear building behavior
XGBoost for stronger prediction models and feature importance analysis
LSTM Neural Networks for forecasting future energy consumption and learning time-based operational patterns
Grey-box ML modeling for combining physics-based EnergyPlus-style results with data-driven correction
Gaussian Process residual modeling for correcting simulation bias and estimating prediction uncertainty
Students will also complete a practical energy analytics project using SQL to join and aggregate building data, then apply Multiple Linear Regression in Python to predict electricity consumption.
You will also learn anomaly detection using Z-score and Isolation Forest, compare statistical and machine learning approaches using confusion matrices.
By the end of this course, you will understand the full practical workflow:
Measurement → Baseline Modeling → Prediction → Anomaly Detection → Savings Estimation
This course is designed for energy professionals, HVAC engineers, building energy modelers, retrofit consultants, sustainability teams, Measurement and Verification practitioners, ESG professionals, decarbonization specialists, and engineers moving into AI and machine learning.
This is not a generic machine learning course.
This course focuses on applying predictive analytics to real building energy problems, helping engineers move from raw data toward prediction, savings analysis, anomaly detection, retrofit evaluation, carbon assessment, and practical decision support.
The course also introduces grey-box machine learning, where physics-based simulation results are improved using Gaussian Process residual correction and uncertainty estimation.