OdysseasKr / neural-disaggregator

Code for NILM experiments using Neural Networks. Uses Keras/Tensorflow and the NILMTK.
MIT License
138 stars 57 forks source link

Training Multiple Buildings: Window GRU with REDD dataset #18

Open VidipG opened 4 years ago

VidipG commented 4 years ago

Hello! I am attempting to use your implementation of the WindowGRU algorithm to train across multiple houses. The following is how the code is structured,

Screen Shot 2019-08-08 at 5 00 25 PM Screen Shot 2019-08-08 at 5 00 46 PM Screen Shot 2019-08-08 at 5 00 57 PM

I am having issues with the test section and the disaggregate method, and am not sure how to proceed. I am working on python 3.7 on Mac OS X.

Thank you!

chenyuliang1996 commented 4 years ago

Have you solved this problem?

OdysseasKr commented 4 years ago

The issue here is that the third parameter for the disaggregate should be a single ElecMeter but you are passing a list of ElecMeters. The third parameter for the disaggregate function is used only to get the metadata for the output meter. So you can fix this issue like this:

disaggregator.disaggregate(test_mains, output, train_meter[0], sample_period=1)

Admittedly the documentation is not clear on this and it should be mentioned explicitly.