GiuTan / Weak-NILM

8 stars 1 forks source link

Weak-NILM

This repository contains source code to perform multi-label classification using a deep learning approach trained with weakly labeled data. This work refers to Multilabel Appliance Classification With Weakly Labeled Data for Non-Intrusive Load Monitoring. The implemented network is a Convolutional Recurrent Neural Network. Both strongly and weakly labeled data are generated from two real-world benchmark datasets: REFIT and UK-DALE.

Two experiments are proposed:

In dataset_creation folder code for synthetic aggregates creation is available for both UK-DALE and REFIT. Modules noise_extraction.py and noised_aggregate_creation.py have to be used to create noised aggregate vectors, adding noise to synthetic vectors. Appliances taken into consideration are kettle, microwave, fridge, washing machine and dishwasher.

Data will be created with both types of label. Appliance states are set to 1 in strong annotations when the specific appliance is ON and 0 when is OFF, based on the on_power_threshold parameter; weak annotations are set to 1 when at least one time appliance is active inside the window. Quantity of strong and weak annotations to be used in the experiments can be defined in the experiment modules. In fact, in ukdale_experiment_1_2 and mixed_training_experiment can be set:

To perform the mixed experiment, in the proposed work REFIT was resample from 8s to 6s period. Specifically, refit_resampling.py can be used for this purpose. For mixed training experiment there is the possibility to set also the testing dataset desired, choosing between REFIT and UK-DALE.

Required packages to prepare the enviroment are listed in environment.yml file.

Structure for the linear softmax pooling layer is inspired by https://github.com/marl/autopool.