This notebook trains and compares multiple approaches for predicting daily maximum Ontario demand:
The regression approach is expected to outperform classification because it avoids the extreme class imbalance problem (5 peaks out of 8,760 hours = 0.057%).
Split by base period boundary to prevent temporal leakage:
Predict daily maximum Ontario Demand (MW) as a continuous quantity. Then derive peak day alerts by comparing predictions to the displacement threshold.
Binary classification with class imbalance handling. Included for comparison to demonstrate why regression is preferred.
Simple rule: alert if forecast max temp > 30°C AND is_weekday AND month in {6,7,8}. This represents what an experienced energy manager might do without a model.
Convert regression predictions into RED/YELLOW/GREEN alerts using the displacement threshold, then evaluate peak detection performance.
SHAP (SHapley Additive exPlanations) values quantify each feature's contribution to individual predictions. This reveals what drives the model's decisions.