Giter Club home page Giter Club logo

nnilm's Introduction

NNILM - Neural Non-Intrusive Load Monitoring

This project is a reimplementation of Jack Kelly's rectangles architecture based on Keras and the NILMToolkit.

Network overview

Network overview

Benchmark comparison

A comparison of the rectangles architecture in this repository with the original implementation by Jack Kelly on the UK-DALE dataset.

Scores

Predictions

Predictions for a true positive, a true negative and a false positive example for a dish washer.

Predictions

Visualization of first convolution layer

Learned filters

The following image shows the 16 learned filters of the first convolution layer.

Filter

Activations for a negative sample

The following image shows the activations of the first convolution layer given a negative sample.

Activations negative sample

Activations for a positive sample

The following image shows the activations of the first convolution layer given a positive sample. The two highlighted filters are thereby interesting. The first filter seems to have learned to detect step changes in the input signal. The second filter seems to have learned to pass the raw input signal to the next layer.

Activations positive sample

Development

Setup virtualenv

We used Python 2 as programming language, because there are some dependencies that are not compatible with Python 3.

  • pip install virtualenv

  • python -m virtualenv env

  • source env/bin/activate

If you set up virtualenv with Python 3, you have to switch to Python 2: virtualenv --python=/usr/bin/python2.7 env

Install dependencies

Because of a failing dependency hmmlearn, we use the option --no-dependencies. The module hmmlearn is not really needed in this implementation.

  • pip install --no-dependencies -r requirements.txt
  • pip install -e .

Leave virtualenv

  • deactivate

Dataset

It is possible to use any dataset supported by the NILMToolkit. You have to convert the dataset to a .h5 file using the converters provided by the NILMToolkit and then place it into the folder ./data: https://github.com/nilmtk/nilmtk/tree/master/nilmtk/dataset_converters

Run training

Run training for 30 epochs: python nnilm/train.py dish_washer_redd -s0 -e30

Resume training from epoch 30: python nnilm/train.py dish_washer_redd -s30 -e40

Run training on GPU cluster: nohup python nnilm/experiments/train_hpc.py --gpu=2 &

Run prediction

Public dataset: python predict.py dish_washer_eco

CSV prediction: python nnilm/experiments/csv_predictor.py -ddish_washer_redd -idata/aggregated_power.csv -s01-04-2018 -e08-04-2018

Experiments

The folder nnilm/experiments contains files that have been used to run my experiments. It shows how the scripts from this repository can be used in another project.

nnilm's People

Contributors

dependabot[bot] avatar maechler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nnilm's Issues

tensorflow version problem

I am trying to install your project on my windows 8.1
I have a problem with tensorflow version as it is only supported for python 3.5 or more and your project need 2.7 and there is no tensorflow for such version on windows
Is there any way to overcome this problem?

User 2to3.py in anacoda can translate this project

Hi maechler,
thanks for your code,I reproduce Kelly‘s result by 2to3.py in anacoda can translate this project and kelly's porject. In fact, that is a feasible way that use the tool to runing on python 3.x,

Question about std

Hi maechler,
Thank you for your code to help me complete my graduation project.I find in kelly's paper,target applicane's power divided by a hand-code 'maximum power demand',but in your code or kelly's response divided target's std .I am troubled by this.

confusion about the choice of date range

Hi Maechler ,
Thanks for nice code. I am a new in nilm and have confusion about the choice of data range in NILM Area, could you please give me some advices if possible?

I want to compare algorithms, what is the standard for choosing date range? As I see in some paper, like Neural nilm, Sequence-to-point learning with neural networks for non-intrusive load monitoring, Sliding Window Approach for Online Energy Disaggregation Using Artificial Neural Networks etc, where author train and test specified houses in ukdale or redd without detail about begin-end(window) date.
If I want to compare my model with existing model described in paper, need i use same date range(windows) on same dataset?

Thank you so much,
Appreciate!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.