How mario-pv/predictive-hvac-optimization-model works
This repository is a Python decision-support pipeline for predicting building heating and cooling loads and turning predictions into HVAC recommendations. The main workflow fetches and preprocesses the UCI energy-efficiency data, saves a CSV, trains and evaluates a multi-output Random Forest, then generates actions from a test sample. A separate script cross-validates and tunes the model. The README also describes live weather integration, but the sampled implementation does not show it; that capability is therefore shown as documented but unverified.
Main entry points: preprocess.py Preprocessing · preprocessed_energy_efficiency.csv Prepared CSV · train_and_evaluate.py Training Pipeline · optimize_model.py Model Tuning
Components 12
Data Preparation
- Preprocessing
preprocess.py - Prepared CSV
preprocessed_energy_efficiency.csv
Modeling
- Training Pipeline
train_and_evaluate.py - Synthetic IAQ Features
train_and_evaluate.py - Random Forest
train_and_evaluate.py - Model Evaluation
train_and_evaluate.py - Model Tuning
optimize_model.py
HVAC Decisions
- HVAC Directives
inference_actions.py - Actionable Recommendations
External Data
- UCI Dataset
- Weather API
Other components
- Operator
Connections 13
- Operator → Preprocessing: runs preprocessing
preprocess.py - Preprocessing → UCI Dataset: fetches dataset
preprocess.py - Preprocessing → Prepared CSV: writes CSV
preprocess.py - Prepared CSV → Training Pipeline: loads data
train_and_evaluate.py - Training Pipeline → Synthetic IAQ Features: adds CO2 feature
train_and_evaluate.py - Synthetic IAQ Features → Random Forest: trains model
train_and_evaluate.py - Random Forest → Model Evaluation: scores predictions
train_and_evaluate.py - Training Pipeline → HVAC Directives: calls directives
train_and_evaluate.py - HVAC Directives → Actionable Recommendations: returns actions
inference_actions.py - Operator → Model Tuning: runs tuning
optimize_model.py - Prepared CSV → Model Tuning: loads data
optimize_model.py - Model Tuning → Random Forest: tunes parameters
optimize_model.py - Weather API → Preprocessing: provides live data
README.md