Skip to content

About the Project

Built with

TensorFlow

Introduction

This project reviews various machine learning models to predict the heating and cooling demand of commercial buildings in Georgia state. To ensure the diversity of potential features, we include both numerical and categorical feature as independent variable.

Watch the Video Demo

Energy Predictor Demo


Repository Structure

The repository follows the structure below:

Note that 'Model Training Workflow' is the main body of model training in this project, whereas 'Multivariate Regression Model' and 'energy_game' show a sample pipeline from model training to deployment application.

├─ Model Training Workflow
├─ Multivariate Regression Model
├─ energy_game
└─ README.md

Frontend

The frontend of energy_game follows the structure below:

energy_game
├─ ...
├─ app                   
|  ├─ api/predict         ## forwards frontend to a Flask API for prediction, and returns prediction
|  ├─ components          ## frontend components and corresponding css files
|  ├─ data                ## defaultBuilding.json
|  ├─ flask-api           ## flask backend
|  ├─ fonts               ## fonts 
|  ├─ favicon.ico         ## website icon
|  ├─ globals.css         ## global styles
|  ├─ layout.tsx          ## layout of Next.js app
|  ├─ page.tsx            ## main page with frontend components
|  └─ three-types.d.ts    ## GLTFLoader for previewer
└─ ...

Backend

The backend of energy_game follows the structure below:

energy_game
├─ ...
├─ app                   
|  ├─ flask-api
|  |  ├─ Model_Cooling_1104    ## desc
|  |  |  ├─ X13_EnergyCode_encoder.pkl   ## 
|  |  |  ├─ X14_HVAC_encoder.pkl         ## 
|  |  |  ├─ X1_Type_encoder.pkl          ## 
|  |  |  ├─ X3_Shape_encoder.pkl         ## 
|  |  |  ├─ gbr_best_Y2.sav              ## 
|  |  |  └─ gbr_best_Y2_compat.joblib    ## 
|  |  |
|  |  ├─ Model_Heating_1104    ## contains similar files as Model_Cooling_1104
|  |  ├─ app.py                ## desc
|  |  └─ requirements.txt      ## desc
└─ ...

Getting Started

Requirements

  1. Run with Python 3.12.5 (otherwise there are issues with the .pkl files)

  2. Install node.js

Setup to run locally

  1. Clone the repository using
    git clone https://github.com/VIP-SMUR/24Fa-EnergyInBuildings-Com.git
    
  2. Navigate to the project folder
    cd energy_game
    
  3. Run front end locally using
    npm run dev
    
  4. To run the flask backend, open a new terminal and navigate to the energy_game/app/flask-api folder. Make sure to have the required python libraries. You can then run app.py without any errors
    pip install -r /path/to/requirements.txt
    
    python app.py
    

Model Information

Datasets

We collected all of the necessary data for training from ComStock - NREL.

Our refined and merged datasets can be found here

Below is a screenshot of all variables (both input and output):

variables

Summary of the datasets is as follows:

dataset

Methodology

We reviewed several popular machine learning models, systematically categorized into Parametric Regression, Non-Parametric Regression, and Ensemble Learning.

Parametric Regression

  • Multiple Linear Regression

Non-Parametric Regression

  • Support Vector Regression
  • K-Nearest Neighbor Regression

Ensemble Learning

  • Extreme Gradient Boosting
  • Categorical Boosting
  • Light Gradient Boosting
  • Gradient Boosting
  • Extra Trees
  • Random Forest

Performance

The following graphs represent the model's performance on training and testing datasets

train test

Deployment

Currently, the game is deployed at: https://surrogate-model-game.vercel.app/

We used two web deployment services: Vercel and Render. For the frontend, we used Vercel, and for the backend we used Render

Presentation

Final Presentation --- 24Fa --- Energy In Buildings

Team

Name Seniority Major Department GitHub Handle
Joseph M. Aerathu Masters Architecture (HPB) ARCH jma1999
Anubha Mahajan Senior Computer Science COC amahajan68
Jessica Hernandez Senior Computer Science COC jhernandez312
Han-Syun Shih Masters Architecture (HBP) ARCH hshih38
Hang Xu PhD Architecture ARCH HangXXXu