This repository contains a simplified, self-contained implementation of a machine-learning-based algorithm to estimate the power demand of datacenters in the US electrical grid, considering both datacenter infrastructure and surrounding business contexts.
The model integrates server hardware characteristics, facility design parameters, business presence (manufacturing, technology hubs, retail, etc.), local grid infrastructure, and environmental conditions to accurately predict power demand with high confidence.
- Synthetic datacenter dataset generator calibrated to US state-level statistics
- Single-facility power demand prediction with uncertainty estimates
- Multi-model machine learning training pipeline (Random Forest, Gradient Boosting, Neural Network)
- Neural Network achieves top performance:
- ( R^2 \approx 0.96 )
- MAPE ( \approx 12.6% )
- Command-Line Interface (CLI) for data generation, model training, and making predictions
- Basic publication-quality visualizations to analyze data and model results
- Comprehensive test suite to ensure correctness
- Easy configuration through
config.json - Lightweight dependencies for quick installation
pip install -r requirements.txtpython dcpower.py generatepython dcpower.py trainpython dcpower.py predict --servers 5000 --rack-density 15 --gpu 0.4 --pue 1.3 \
--sqft 200000 --cooling Liquid --state Virginia --grid-capacity 850 --temp 65pytestdatacenter_power_predictor.py— Core algorithm and ML training codedata_utils.py— Utilities for synthetic dataset generationtrain_models.py— Training and evaluation pipelinedcpower.py— Command-line interface for all operationsvisualization_utils.py— Plotting functions for visualizationtest_datacenter_predictor.py— Pytest suite to validate functionalityconfig.json— User-configurable parameters for training and datarequirements.txt— All Python package dependenciesREADME.md— Project overview and instructionssetup.py— Installation script for pip-install
- Machine Learning Accuracy: Neural Networks achieved an ( R^2 ) of 0.96 and MAPE around 12.6%
- Feature Importance: Server count, facility size, and rack density dominate power demand prediction; nearby businesses add demand multipliers
- US State Power Shares: Virginia leads with over 25% of its electricity devoted to datacenters, followed by Midwest and West Coast states
- Grid Impact Stratification: Most datacenters represent low–moderate grid load impact; a small percentage cause high strain in key utility territories
For questions or issues:
- See the GitHub Issues
This project is licensed under the MIT License — see the LICENSE file for details.
Thanks to the U.S. Department of Energy, Lawrence Berkeley National Laboratory, and Energy Systems Integration Group for data and inspiration.
- INET-TUB Datacenter Study
- Thesis on Datacenter Energy Use
- NREL Report on Datacenters
- ScienceDirect Research Article
- IEA Report 2025
- DOE/LBNL Guidelines
- A2EI Data Release