IESO Coincident Peak Prediction — Feature Engineering

This notebook transforms raw demand and weather data into ML-ready features. Feature categories:

Temporal Features

Calendar indicators including Ontario statutory holidays. Holidays behave like weekends for demand purposes — commercial and industrial loads drop.

Weather Features

Transform raw temperature and humidity into domain-relevant indicators:

Demand Momentum Features

Lagged and rolling demand features capture system-level momentum. These are available by the morning of the prediction day.

Peak Context Features

These features are unique to the coincident peak prediction problem. They track the running top-5 peak state within each base period, providing the displacement threshold that defines whether a day could produce a new peak.

Critical: these are computed sequentially within each base period to prevent look-ahead bias.

Target Variable Construction

Create the regression target (daily max demand) and binary classification labels (is this a top-5 peak day?) from ground truth data.

Assemble Feature Matrix

Merge all feature groups into a single daily-resolution feature matrix.

Feature Correlation Matrix

Feature Importance (Mutual Information)

Save Feature-Engineered Dataset