A machine learning project that forecasts electricity demand using time-series energy market data. The system applies feature engineering techniques such as lag features, rolling statistics, and time-based variables, and uses an XGBoost regression model for short-term demand prediction. It is designed for infrastructure planning and energy resource optimization.
- Forecast electricity demand using historical energy market data
- Engineer meaningful time-series features (lags, rolling averages, time features)
- Train a high-performance XGBoost regression model
- Evaluate model performance using regression metrics
- Visualize predictions and insights for analysis
Energy_demand/
│
├── data/
│ └── electricity_demand.csv
│
├── models/
│ └── xgboost_forecaster.pkl
│
├── reports/
│ ├── forecast_results.csv
│ ├── model_metrics.csv
│ └── figures/
│ ├── actual_vs_forecast.png
│ ├── feature_importance.png
│ ├── residuals.png
│ └── demand_trend.png
│
├── src/
│ ├── data_loader.py
│ ├── feature_engineering.py
│ ├── feature_pipeline.py
│ ├── model.py
│ ├── model_pipeline.py
│ ├── evaluation.py
│ ├── visualization.py
│ └── pipeline.py
│
├── tests/
│ ├── test_data_loader.py
│ ├── test_features.py
│ └── test_model.py
│
├── dashboard.py
├── main.py
├── requirements.txt
└── README.md
git clone https://github.com/your-username/infrastructure-demand-forecaster.git
cd infrastructure-demand-forecaster
python -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
python main.py
streamlit run dashboard.py
| Metric | Score |
|---|---|
| MAE | 41.66 |
| RMSE | 52.19 |
| R² | 0.897 |
- Time-series feature engineering
- Lag features
- Rolling statistics
- XGBoost regression
- Train/test split
- Data visualization
- Python
- Pandas
- NumPy
- Scikit-learn
- XGBoost
- Streamlit
- Plotly
Name: MD Moshiur Rahman
MIT License



