How dylanbahenda/nilm-load-disagregation-xai works
This is a course project for non-intrusive load monitoring, with a notebook-centered workflow that predicts appliance power from aggregate mains readings and compares model explanations. Dataset preparation cleans and resamples raw measurements into a pickle; the notebook loads data, engineers features, trains a decision tree and 1D-CNN, and performs sensitivity analysis and interpretation. Utility functions support evaluation, plotting, and Grad-CAM. The notebook’s internal wiring was not sampled, so its documented stages are shown without asserting unverified calls between them.
Main entry points: Load_Disaggregation_XAI.ipynb NILM workflow notebook · nilm_utils.py XAI comparison · prepare_dataset.py Clean and resample · house2_df.pkl House dataset
Components 13
Data Preparation
- Clean and resample
scripts/prepare_dataset.py - House dataset
data/house2_df.pkl
Modeling and Analysis
- NILM workflow notebook
Load_Disaggregation_XAI.ipynb - Feature engineering
Load_Disaggregation_XAI.ipynb - Decision tree
Load_Disaggregation_XAI.ipynb - 1D-CNN
Load_Disaggregation_XAI.ipynb - Parameter sensitivity
Load_Disaggregation_XAI.ipynb - Model metrics
scripts/nilm_utils.py - Prediction plots
scripts/nilm_utils.py
Explainability
- Decision paths
scripts/nilm_utils.py - Grad-CAM
scripts/nilm_utils.py - XAI comparison
scripts/nilm_utils.py
Other components
- Raw measurements
Connections 14
- Raw measurements → Clean and resample: loads
scripts/prepare_dataset.py - Clean and resample → House dataset: exports
scripts/prepare_dataset.py - House dataset → NILM workflow notebook: loads
README.md - NILM workflow notebook → Feature engineering: performs
README.md - NILM workflow notebook → Decision tree: trains
README.md - NILM workflow notebook → 1D-CNN: trains
README.md - NILM workflow notebook → Parameter sensitivity: analyzes
README.md - NILM workflow notebook → Model metrics: uses utilities
README.md - NILM workflow notebook → Prediction plots: uses utilities
README.md - NILM workflow notebook → Decision paths: uses utilities
README.md - NILM workflow notebook → Grad-CAM: uses utilities
README.md - NILM workflow notebook → XAI comparison: uses utilities
README.md - XAI comparison → Grad-CAM: computes heatmap
scripts/nilm_utils.py - XAI comparison → Decision paths: renders path
scripts/nilm_utils.py