LightGBM models for predicting electricity consumption:
- 48-hour ahead predictions (
48hr_LightGBM.ipynb) - 12-month ahead predictions (
12m_LightGBM_model.ipynb)
Install dependencies:
pip -m venv .venv
pip install -r requirements.txt
.venv/Scripts/activateEnsure that the CSVs are in the project root.
jupyter notebook 48hr_LightGBM.ipynbRun all cells sequentially. The notebook:
- Loads and preprocesses data from
merged.csv - Creates time and lag features
- Tunes hyperparameters with Optuna
- Trains final LightGBM model
jupyter notebook 12m_LightGBM_model.ipynbRun all cells sequentially. The notebook:
- Aggregates hourly data to monthly
- Creates monthly features and lags
- Trains 12 separate models (one for each month ahead)
- Models saved in
12 month prediction model weights/
48hr_weights.txt- 48-hour model weights12m_weights/- 12 monthly model files (lightgbm_model_1.txt through lightgbm_model_12.txt)