Giter VIP home page Giter VIP logo

neuralnilm's Introduction

neuralnilm

Deep Neural Networks Applied to Energy Disaggregation

Please note that this code was never finished! It is incomplete and unsupported! Please do not use unless you really, really know what you are doing! Please see my Neural NILM prototype code to see exactly what I implemented in my Neural NILM paper! Your best bet if you want to re-implement Neural NILM would probably be start from scratch using a modern framework like TensorFlow, and perhaps use nilmtk to help load the datasets.

This is a complete re-write of the Neural NILM Prototype.

Getting started

Here is a short iPython notebook to show how to load activations from UKDALE.

Please also note that my neuralnilm code is only provided as a proof of concept and as a reference. It isn't yet in a state where it's easy for other people to run the code. Unfortunately I won't have time to work on the Neural NILM code or to provide support anytime in the forseable future. So the code is provided 'as is' without any support at the moment. Maybe one day I'll have time to support the code or to update the code.

That said, if you're really determined to read and understand this code then here's a quite description of the basic architecture:

Each 'experiment' is defined in a Python script in experiment_definitions/. Each of these files must have a run function which, well, runs the experiment!

experiment_definitions/ also should include a text file called job_list.txt which is just a list of experiment names like e575. The script scripts/run_experiments.py looks at job_list.txt to find the next job to run. After each job completes, run_experiments.py removes that job from the job_list. In this way, it is possible to add, remove or re-order jobs from the job_list while an experiment is running.

The re-usable code which makes up the bulk of the NeuralNILM package lives in neuralnilm/neuralnilm. net.py includes a Net class which handles the construction of each neural network. trainer.py includes a Trainer class which trains each net and sends metrics to the Mongo database.

neuralnilm/neuralnilm/data includes the mechanisms for loading and transforming data. This is designed to be very modular so you can easily mix and match data sources, pre-processing steps and networks. For a quick overview of how this all works, take a look at some of the python files in the experiment_definitions directory.

neuralnilm/neuralnilm/monitor contains the mechanisms for loading metrics and metadata from the Mongo database and plotting it.

Requirements

See requirements.txt for the required Python packages. Also requires Mongo DB.

Configuration

You need to create a ~/.neuralnilm text file to specify some parameters. Please see example_config_file.

MongoDB remote access

See http://www.mkyong.com/mongodb/mongodb-allow-remote-access/

neuralnilm's People

Contributors

b3326023 avatar jackkelly 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neuralnilm's Issues

Is there any available, ready-to-use model/nets?

Hi Kelly, thanks for sharing your work. I am trying to run this code, but encounter the same problem as #2

I understand that you are not supporting this repo anymore. However, I am just curious, do you have trained nets that we can just use for your test set? Because I see each experiment code (e575, e576, etc) and I guess all of them require nets for each appliance to be created/trained from scratch. And I dont see trained nets inside neuralnilm subdirectory.

Thanks again!

AttributeError: 'NoneType' object has no attribute 'dropna'

Hello, after i try to run the run_experiments.py from /neuralnilm/scripts , it shows "AttributeError: 'NoneType' object has no attribute 'dropna'". Does anyone know how to solve it?

The version of Theano installed is (0.8.0) and Lasagne (0.1).

(my_project) ubuntu@ubuntu:~/Desktop/Goh_new/neuralnilm/scripts$ python run_experiments.py
Using gpu device 0: GeForce GTX 1080 Ti (CNMeM is disabled, CuDNN 6021)
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/theano/sandbox/cuda/init.py:600: UserWarning: Your CuDNN version is more recent then Theano. If you see problems, try updating Theano or downgrading CuDNN to version 4.
warnings.warn(warn)
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
"downsample module has been moved to the theano.tensor.signal.pool module.")
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/h5py/init.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._conv import register_converters as _register_converters
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/h5py/init.py:45: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/h5py/_hl/group.py:22: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .. import h5g, h5i, h5o, h5r, h5t, h5l, h5p
WARNING (theano.sandbox.cuda): Ignoring call to use(1), GPU number 0 is already in use.
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/sklearn/utils/init.py:10: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .murmurhash import murmurhash3_32
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/sklearn/utils/extmath.py:24: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._logistic_sigmoid import _log_logistic_sigmoid
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/sklearn/utils/extmath.py:26: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .sparsefuncs_fast import csr_row_norms
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/sklearn/metrics/cluster/supervised.py:23: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .expected_mutual_info_fast import expected_mutual_information
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/sklearn/metrics/pairwise.py:30: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .pairwise_fast import _chi2_kernel_fast, _sparse_manhattan
Loading NILMTK activations...
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/tables/init.py:90: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .utilsextension import (
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/tables/file.py:35: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import hdf5extension
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/tables/link.py:33: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import linkextension
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/tables/table.py:28: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import tableextension
/home/ubuntu/Desktop/Goh_new/my_project/local/lib/python2.7/site-packages/tables/index.py:33: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import indexesextension
Loading kettle for UK-DALE_building_1...
Loaded 2856 kettle activations from UK-DALE_building_1.
Loading microwave for UK-DALE_building_1...
Loaded 3181 microwave activations from UK-DALE_building_1.
Loading washing machine for UK-DALE_building_1...
Loaded 547 washing machine activations from UK-DALE_building_1.
Loading dish washer for UK-DALE_building_1...
Loaded 206 dish washer activations from UK-DALE_building_1.
Loading fridge for UK-DALE_building_1...
Loaded 16595 fridge activations from UK-DALE_building_1.
Loading kettle for UK-DALE_building_2...
Loaded 534 kettle activations from UK-DALE_building_2.
Loading microwave for UK-DALE_building_2...
Loaded 412 microwave activations from UK-DALE_building_2.
Loading washing machine for UK-DALE_building_2...
Loaded 53 washing machine activations from UK-DALE_building_2.
Loading dish washer for UK-DALE_building_2...
Loaded 98 dish washer activations from UK-DALE_building_2.
Loading fridge for UK-DALE_building_2...
Loaded 2 fridge activations from UK-DALE_building_2.
Loading kettle for UK-DALE_building_3...
Loaded 40 kettle activations from UK-DALE_building_3.
Loading microwave for UK-DALE_building_3...
UK-DALE_building_3 has no microwave. Full exception: {'instance': 1, 'type': 'microwave'}
Loading washing machine for UK-DALE_building_3...
UK-DALE_building_3 has no washing machine. Full exception: {'instance': 1, 'type': 'washing machine'}
Loading dish washer for UK-DALE_building_3...
UK-DALE_building_3 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'}
Loading fridge for UK-DALE_building_3...
UK-DALE_building_3 has no fridge. Full exception: {'instance': 1, 'type': 'fridge'}
Loading kettle for UK-DALE_building_4...
Loaded 689 kettle activations from UK-DALE_building_4.
Loading microwave for UK-DALE_building_4...
Loaded 154 microwave activations from UK-DALE_building_4.
Loading washing machine for UK-DALE_building_4...
Loaded 154 washing machine activations from UK-DALE_building_4.
Loading dish washer for UK-DALE_building_4...
UK-DALE_building_4 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'}
Loading fridge for UK-DALE_building_4...
Loaded 4680 fridge activations from UK-DALE_building_4.
Loading kettle for UK-DALE_building_5...
Loaded 173 kettle activations from UK-DALE_building_5.
Loading microwave for UK-DALE_building_5...
Loaded 0 microwave activations from UK-DALE_building_5.
Loading washing machine for UK-DALE_building_5...
Loaded 6 washing machine activations from UK-DALE_building_5.
Loading dish washer for UK-DALE_building_5...
Loaded 23 dish washer activations from UK-DALE_building_5.
Loading fridge for UK-DALE_building_5...
Loaded 1632 fridge activations from UK-DALE_building_5.
Loading kettle for UK-DALE_building_2...
Loaded 563 kettle activations from UK-DALE_building_2.
Loading microwave for UK-DALE_building_2...
Loaded 422 microwave activations from UK-DALE_building_2.
Loading washing machine for UK-DALE_building_2...
Loaded 57 washing machine activations from UK-DALE_building_2.
Loading dish washer for UK-DALE_building_2...
Loaded 105 dish washer activations from UK-DALE_building_2.
Loading fridge for UK-DALE_building_2...
Loaded 2 fridge activations from UK-DALE_building_2.
Loading kettle for UK-DALE_building_5...
Loaded 192 kettle activations from UK-DALE_building_5.
Loading microwave for UK-DALE_building_5...
Loaded 1 microwave activations from UK-DALE_building_5.
Loading washing machine for UK-DALE_building_5...
Loaded 6 washing machine activations from UK-DALE_building_5.
Loading dish washer for UK-DALE_building_5...
Loaded 46 dish washer activations from UK-DALE_building_5.
Loading fridge for UK-DALE_building_5...
Loaded 3232 fridge activations from UK-DALE_building_5.
Loading kettle for UK-DALE_building_1...
Loaded 0 kettle activations from UK-DALE_building_1.
Loading microwave for UK-DALE_building_1...
Loaded 0 microwave activations from UK-DALE_building_1.
Loading washing machine for UK-DALE_building_1...
Loaded 0 washing machine activations from UK-DALE_building_1.
Loading dish washer for UK-DALE_building_1...
Loaded 0 dish washer activations from UK-DALE_building_1.
Loading fridge for UK-DALE_building_1...
Loaded 0 fridge activations from UK-DALE_building_1.
Loading kettle for UK-DALE_building_2...
Loaded 29 kettle activations from UK-DALE_building_2.
Loading microwave for UK-DALE_building_2...
Loaded 10 microwave activations from UK-DALE_building_2.
Loading washing machine for UK-DALE_building_2...
Loaded 4 washing machine activations from UK-DALE_building_2.
Loading dish washer for UK-DALE_building_2...
Loaded 7 dish washer activations from UK-DALE_building_2.
Loading fridge for UK-DALE_building_2...
Loaded 0 fridge activations from UK-DALE_building_2.
Loading kettle for UK-DALE_building_3...
Loaded 20 kettle activations from UK-DALE_building_3.
Loading microwave for UK-DALE_building_3...
UK-DALE_building_3 has no microwave. Full exception: {'instance': 1, 'type': 'microwave'}
Loading washing machine for UK-DALE_building_3...
UK-DALE_building_3 has no washing machine. Full exception: {'instance': 1, 'type': 'washing machine'}
Loading dish washer for UK-DALE_building_3...
UK-DALE_building_3 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'}
Loading fridge for UK-DALE_building_3...
UK-DALE_building_3 has no fridge. Full exception: {'instance': 1, 'type': 'fridge'}
Loading kettle for UK-DALE_building_4...
Loaded 44 kettle activations from UK-DALE_building_4.
Loading microwave for UK-DALE_building_4...
Loaded 4 microwave activations from UK-DALE_building_4.
Loading washing machine for UK-DALE_building_4...
Loaded 4 washing machine activations from UK-DALE_building_4.
Loading dish washer for UK-DALE_building_4...
UK-DALE_building_4 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'}
Loading fridge for UK-DALE_building_4...
Loaded 145 fridge activations from UK-DALE_building_4.
Loading kettle for UK-DALE_building_5...
Loaded 19 kettle activations from UK-DALE_building_5.
Loading microwave for UK-DALE_building_5...
Loaded 1 microwave activations from UK-DALE_building_5.
Loading washing machine for UK-DALE_building_5...
Loaded 1 washing machine activations from UK-DALE_building_5.
Loading dish washer for UK-DALE_building_5...
Loaded 23 dish washer activations from UK-DALE_building_5.
Loading fridge for UK-DALE_building_5...
Loaded 1600 fridge activations from UK-DALE_building_5.
Done loading NILMTK activations.
Starting training for net ae, appliance washing machine.
------------- INITIALISING SyntheticAggregateSource --------------
------------- INITIALISING RealAggregateSource --------------
Loading NILMTK mains...
Loading mains for UK-DALE_building_1...
Loaded mains data from building UK-DALE_building_1 for fold train from 2013-04-12 00:00:00+01:00 to 2015-01-05 06:27:12+00:00.
Loading mains for UK-DALE_building_5...
Loaded mains data from building UK-DALE_building_5 for fold train from 2014-06-29 17:23:42+01:00 to 2014-08-31 23:59:54+01:00.
Loading mains for UK-DALE_building_1...
Traceback (most recent call last):
File "run_experiments.py", line 60, in
main()
File "run_experiments.py", line 22, in main
_run_job(next_job)
File "run_experiments.py", line 48, in _run_job
eval("{next_job}.run('{next_job}')".format(next_job=next_job))
File "", line 1, in
File "/home/ubuntu/Desktop/Goh_new/neuralnilm/experiment_definitions/e578.py", line 63, in run
pipeline = get_pipeline(target_appliance, activations)
File "/home/ubuntu/Desktop/Goh_new/neuralnilm/experiment_definitions/e578.py", line 185, in get_pipeline
sample_period=SAMPLE_PERIOD
File "build/bdist.linux-x86_64/egg/neuralnilm/data/realaggregatesource.py", line 65, in init
File "build/bdist.linux-x86_64/egg/neuralnilm/data/realaggregatesource.py", line 93, in _load_mains_into_memory
AttributeError: 'NoneType' object has no attribute 'dropna'
Closing remaining open files:/home/ubuntu/Desktop/Goh/Data/ukdale.h5...done

Plotter and Disaggregator Definition

Hello, in 'NeuralNILM design'

plotter = Plotter() disaggregator = Disaggregator()

For plotter. NameError: name 'Plotter' is not defined
For disaggregator, TypeError: init() missing 2 required positional arguments: 'mains' and 'output_path'

IndexError in "notebooks/Neural NILM test"

I am trying to run neural nilm in my pc environment, but the IndexError occurs like below.
How can I fix it?

stride_source = StrideSource(
    target_appliance=TARGET_APPLIANCE,
    seq_length=SEQ_LENGTH,
    filename=NILMTK_FILENAME,
    windows=WINDOWS,
    sample_period=SAMPLE_PERIOD,
    stride=STRIDE
)

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-4-971361e05051> in <module>()
      5     windows=WINDOWS,
      6     sample_period=SAMPLE_PERIOD,
----> 7     stride=STRIDE
      8 )

/Users/JH/Documents/GitHub/neuralnilm/neuralnilm/data/stridesource.pyc in __init__(self, target_appliance, seq_length, filename, windows, sample_period, stride, rng_seed)
     45         self.num_batches_for_validation = None
     46 
---> 47         self._load_data_into_memory()
     48         self._compute_num_sequences_per_building()
     49 

/Users/JH/Documents/GitHub/neuralnilm/neuralnilm/data/stridesource.pyc in _load_data_into_memory(self)
     71 
     72                 mains_meter = elec.mains()
---> 73                 mains_good_sections = mains_meter.good_sections()
     74 
     75                 appliance_meter = elec[self.target_appliance]

/private/var/root/nilmtk/nilmtk/elecmeter.pyc in good_sections(self, **loader_kwargs)
    630         results_obj = GoodSections.results_class(self.device['max_sample_period'])
    631         return self._get_stat_from_cache_or_compute(
--> 632             nodes, results_obj, loader_kwargs)        
    633 
    634     def _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs):

/private/var/root/nilmtk/nilmtk/elecmeter.pyc in _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs)
    684         if loader_kwargs.get('preprocessing') is None:
    685             cached_stat = self.get_cached_stat(key_for_cached_stat)
--> 686             results_obj.import_from_cache(cached_stat, sections)
    687 
    688             def find_sections_to_compute():

/private/var/root/nilmtk/nilmtk/stats/goodsectionsresults.pyc in import_from_cache(self, cached_stat, sections)
    116                     timeframes = []
    117                     for _, row in sections_df.iterrows():
--> 118                         section_start = tz_localize_naive(row['section_start'], tz)
    119                         section_end = tz_localize_naive(row['section_end'], tz)
    120                         timeframes.append(TimeFrame(section_start, section_end))

/Users/JH/anaconda2/lib/python2.7/site-packages/pandas/core/series.pyc in __getitem__(self, key)
    555     def __getitem__(self, key):
    556         try:
--> 557             result = self.index.get_value(self, key)
    558 
    559             if not np.isscalar(result):

/Users/JH/anaconda2/lib/python2.7/site-packages/pandas/core/index.pyc in get_value(self, series, key)
   1778         s = getattr(series,'_values',None)
   1779         if isinstance(s, Index) and lib.isscalar(key):
-> 1780             return s[key]
   1781 
   1782         s = _values_from_object(series)

/Users/JH/anaconda2/lib/python2.7/site-packages/pandas/tseries/base.pyc in __getitem__(self, key)
     98         getitem = self._data.__getitem__
     99         if np.isscalar(key):
--> 100             val = getitem(key)
    101             return self._box_func(val)
    102         else:

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

A bug in metrics

In the function relative_error_in_total_energy,The order of the two parameters is reversed.

bson encoding of array fails

Results are not being stored to mongodb due to failing bson encoding:

...
Loaded data from building UK-DALE_building_5 for fold unseen_appliances from 2014-06-29 17:23:48+01:00 to 2014-09-07 15:02:18+01:00.
Done loading NILMTK mains data.
Directory exists = '/Users/nblu/Projects/16-01/src/neuralnilm/results/e577/ae/kettle'
  Re-using directory.
Traceback (most recent call last):
  File "./scripts/run_experiments.py", line 59, in <module>
    main()
  File "./scripts/run_experiments.py", line 21, in main
    _run_job(next_job)
  File "./scripts/run_experiments.py", line 47, in _run_job
    eval("{next_job}.run('{next_job}')".format(next_job=next_job))
  File "<string>", line 1, in <module>
  File "/Users/nblu/Projects/16-01/src/neuralnilm/experiment_definitions/e577.py", line 84, in run
    report = trainer.submit_report()
  File "build/bdist.macosx-10.12-x86_64/egg/neuralnilm/trainer.py", line 168, in submit_report
  File "/Users/nblu/.virtualenvs/neuralnilm/lib/python2.7/site-packages/pymongo/collection.py", line 657, in insert_one
    bypass_doc_val=bypass_document_validation),
  File "/Users/nblu/.virtualenvs/neuralnilm/lib/python2.7/site-packages/pymongo/collection.py", line 562, in _insert
    check_keys, manipulate, write_concern, op_id, bypass_doc_val)
  File "/Users/nblu/.virtualenvs/neuralnilm/lib/python2.7/site-packages/pymongo/collection.py", line 543, in _insert_one
    check_keys=check_keys)
  File "/Users/nblu/.virtualenvs/neuralnilm/lib/python2.7/site-packages/pymongo/pool.py", line 424, in command
    self._raise_connection_failure(error)
  File "/Users/nblu/.virtualenvs/neuralnilm/lib/python2.7/site-packages/pymongo/pool.py", line 552, in _raise_connection_failure
    raise error
bson.errors.InvalidDocument: Cannot encode object: array([[[ 3.30032039]],

       [[ 0.16541311]],

       [[ 0.38603193]],

    ...

       [[ 0.20147485]],

       [[ 1.73182499]]], dtype=float32)

The issue might be that numpy number types are not natively supported by pymongo/mongodb. I am just surprised that this ever worked if that is the real issue.

I am going to try converting it manually before storing to mongodb.

cannot reindex a non-unique index " ValueError: cannot reindex a non-unique index with a method or limit

Hello, JackKelly . When I run your project by running the script: /home/jacoob/workStation/extraProject/neuralnilm-master/scripts/run_experiments.py
(And I write 'e578' in the 'job_list.txt' file.)But the ValueError occurs like below.
How can I fix it?Can anyone help me?
Loading NILMTK activations nicely ,but when Loading NILMTK mains... the Error occurs like this:

Loading NILMTK activations... Loading kettle for UK-DALE_building_1... /home/jacoob/workStation/extraProject/nilmtk/nilmtk/utils.py:391: FutureWarning: fill_method is deprecated to .resample() the new syntax is .resample(...).ffill(limit=20) data = data.resample(**resample_kwargs) # resample_kwargs=fill_method:ffill limit:20 rule:6s Loaded 2858 kettle activations from UK-DALE_building_1. Loading microwave for UK-DALE_building_1... Loaded 3189 microwave activations from UK-DALE_building_1. Loading washing machine for UK-DALE_building_1... Loaded 546 washing machine activations from UK-DALE_building_1. Loading dish washer for UK-DALE_building_1... Loaded 206 dish washer activations from UK-DALE_building_1. Loading fridge for UK-DALE_building_1... Loaded 16587 fridge activations from UK-DALE_building_1. Loading kettle for UK-DALE_building_2... Loaded 534 kettle activations from UK-DALE_building_2. Loading microwave for UK-DALE_building_2... Loaded 412 microwave activations from UK-DALE_building_2. Loading washing machine for UK-DALE_building_2... Loaded 53 washing machine activations from UK-DALE_building_2. Loading dish washer for UK-DALE_building_2... Loaded 98 dish washer activations from UK-DALE_building_2. Loading fridge for UK-DALE_building_2... Loaded 2 fridge activations from UK-DALE_building_2. Loading kettle for UK-DALE_building_3... Loaded 40 kettle activations from UK-DALE_building_3. Loading microwave for UK-DALE_building_3... UK-DALE_building_3 has no microwave. Full exception: {'instance': 1, 'type': 'microwave'} Loading washing machine for UK-DALE_building_3... UK-DALE_building_3 has no washing machine. Full exception: {'instance': 1, 'type': 'washing machine'} Loading dish washer for UK-DALE_building_3... UK-DALE_building_3 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'} Loading fridge for UK-DALE_building_3... UK-DALE_building_3 has no fridge. Full exception: {'instance': 1, 'type': 'fridge'} Loading kettle for UK-DALE_building_4... Loaded 688 kettle activations from UK-DALE_building_4. Loading microwave for UK-DALE_building_4... Loaded 152 microwave activations from UK-DALE_building_4. Loading washing machine for UK-DALE_building_4... Loaded 152 washing machine activations from UK-DALE_building_4. Loading dish washer for UK-DALE_building_4... UK-DALE_building_4 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'} Loading fridge for UK-DALE_building_4... Loaded 4680 fridge activations from UK-DALE_building_4. Loading kettle for UK-DALE_building_5... Loaded 173 kettle activations from UK-DALE_building_5. Loading microwave for UK-DALE_building_5... Loaded 0 microwave activations from UK-DALE_building_5. Loading washing machine for UK-DALE_building_5... Loaded 6 washing machine activations from UK-DALE_building_5. Loading dish washer for UK-DALE_building_5... Loaded 23 dish washer activations from UK-DALE_building_5. Loading fridge for UK-DALE_building_5... Loaded 1634 fridge activations from UK-DALE_building_5. Loading kettle for UK-DALE_building_2... Loaded 563 kettle activations from UK-DALE_building_2. Loading microwave for UK-DALE_building_2... Loaded 422 microwave activations from UK-DALE_building_2. Loading washing machine for UK-DALE_building_2... Loaded 57 washing machine activations from UK-DALE_building_2. Loading dish washer for UK-DALE_building_2... Loaded 105 dish washer activations from UK-DALE_building_2. Loading fridge for UK-DALE_building_2... Loaded 2 fridge activations from UK-DALE_building_2. Loading kettle for UK-DALE_building_5... Loaded 192 kettle activations from UK-DALE_building_5. Loading microwave for UK-DALE_building_5... Loaded 1 microwave activations from UK-DALE_building_5. Loading washing machine for UK-DALE_building_5... Loaded 6 washing machine activations from UK-DALE_building_5. Loading dish washer for UK-DALE_building_5... Loaded 46 dish washer activations from UK-DALE_building_5. Loading fridge for UK-DALE_building_5... Loaded 3233 fridge activations from UK-DALE_building_5. Loading kettle for UK-DALE_building_1... Loaded 0 kettle activations from UK-DALE_building_1. Loading microwave for UK-DALE_building_1... Loaded 0 microwave activations from UK-DALE_building_1. Loading washing machine for UK-DALE_building_1... Loaded 0 washing machine activations from UK-DALE_building_1. Loading dish washer for UK-DALE_building_1... Loaded 0 dish washer activations from UK-DALE_building_1. Loading fridge for UK-DALE_building_1... Loaded 0 fridge activations from UK-DALE_building_1. Loading kettle for UK-DALE_building_2... Loaded 29 kettle activations from UK-DALE_building_2. Loading microwave for UK-DALE_building_2... Loaded 10 microwave activations from UK-DALE_building_2. Loading washing machine for UK-DALE_building_2... Loaded 4 washing machine activations from UK-DALE_building_2. Loading dish washer for UK-DALE_building_2... Loaded 7 dish washer activations from UK-DALE_building_2. Loading fridge for UK-DALE_building_2... Loaded 0 fridge activations from UK-DALE_building_2. Loading kettle for UK-DALE_building_3... Loaded 19 kettle activations from UK-DALE_building_3. Loading microwave for UK-DALE_building_3... UK-DALE_building_3 has no microwave. Full exception: {'instance': 1, 'type': 'microwave'} Loading washing machine for UK-DALE_building_3... UK-DALE_building_3 has no washing machine. Full exception: {'instance': 1, 'type': 'washing machine'} Loading dish washer for UK-DALE_building_3... UK-DALE_building_3 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'} Loading fridge for UK-DALE_building_3... UK-DALE_building_3 has no fridge. Full exception: {'instance': 1, 'type': 'fridge'} Loading kettle for UK-DALE_building_4... Loaded 44 kettle activations from UK-DALE_building_4. Loading microwave for UK-DALE_building_4... Loaded 4 microwave activations from UK-DALE_building_4. Loading washing machine for UK-DALE_building_4... Loaded 4 washing machine activations from UK-DALE_building_4. Loading dish washer for UK-DALE_building_4... UK-DALE_building_4 has no dish washer. Full exception: {'instance': 1, 'type': 'dish washer'} Loading fridge for UK-DALE_building_4... Loaded 145 fridge activations from UK-DALE_building_4. Loading kettle for UK-DALE_building_5... Loaded 19 kettle activations from UK-DALE_building_5. Loading microwave for UK-DALE_building_5... Loaded 1 microwave activations from UK-DALE_building_5. Loading washing machine for UK-DALE_building_5... Loaded 1 washing machine activations from UK-DALE_building_5. Loading dish washer for UK-DALE_building_5... Loaded 23 dish washer activations from UK-DALE_building_5. Loading fridge for UK-DALE_building_5... Loaded 1599 fridge activations from UK-DALE_building_5. Done loading NILMTK activations. Starting training for net ae, appliance washing machine. ------------- INITIALISING SyntheticAggregateSource -------------- ------------- INITIALISING RealAggregateSource -------------- Loading NILMTK mains... Loading mains for UK-DALE_building_1... /home/jacoob/workStation/extraProject/nilmtk/nilmtk/utils.py:391: FutureWarning: fill_method is deprecated to .resample() the new syntax is .resample(...).ffill(limit=1) data = data.resample(**resample_kwargs) # resample_kwargs=fill_method:ffill limit:20 rule:6s Traceback (most recent call last): File "/home/jacoob/workStation/extraProject/neuralnilm-master/scripts/run_experiments.py", line 58, in <module> main() File "/home/jacoob/workStation/extraProject/neuralnilm-master/scripts/run_experiments.py", line 20, in main _run_job(next_job) File "/home/jacoob/workStation/extraProject/neuralnilm-master/scripts/run_experiments.py", line 46, in _run_job eval("{next_job}.run('{next_job}')".format(next_job=next_job)) File "<string>", line 1, in <module> File "/home/jacoob/workStation/extraProject/neuralnilm-master/experiment_definitions/e578.py", line 63, in run pipeline = get_pipeline(target_appliance, activations) File "/home/jacoob/workStation/extraProject/neuralnilm-master/experiment_definitions/e578.py", line 185, in get_pipeline sample_period=SAMPLE_PERIOD File "/home/jacoob/workStation/extraProject/neuralnilm-master/neuralnilm/data/realaggregatesource.py", line 65, in __init__ self._load_mains_into_memory() File "/home/jacoob/workStation/extraProject/neuralnilm-master/neuralnilm/data/realaggregatesource.py", line 93, in _load_mains_into_memory sections=good_sections).dropna() File "/home/jacoob/workStation/extraProject/nilmtk/nilmtk/electric.py", line 107, in power_series_all_data for series in self.power_series(**kwargs): File "/home/jacoob/workStation/extraProject/nilmtk/nilmtk/electric.py", line 631, in load_series for chunk in generator: File "/home/jacoob/workStation/extraProject/nilmtk/nilmtk/preprocessing/apply.py", line 15, in process new_chunk = self.func(chunk) File "/home/jacoob/workStation/extraProject/nilmtk/nilmtk/electric.py", line 147, in resample_func return safe_resample(df, **resample_kwargs) File "/home/jacoob/workStation/extraProject/nilmtk/nilmtk/utils.py", line 391, in safe_resample data = data.resample(**resample_kwargs) # resample_kwargs=fill_method:ffill limit:20 rule:6s File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/generic.py", line 5526, in resample limit=limit) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/resample.py", line 670, in _maybe_process_deprecations r = r.aggregate(fill_method, limit=limit) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/resample.py", line 317, in aggregate result, how = self._aggregate(arg, *args, **kwargs) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/base.py", line 340, in _aggregate **kwargs), None File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/base.py", line 296, in _try_aggregate_string_function return f(*args, **kwargs) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/resample.py", line 471, in pad return self._upsample('pad', limit=limit) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/resample.py", line 809, in _upsample limit=limit, fill_value=fill_value) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/util/_decorators.py", line 127, in wrapper return func(*args, **kwargs) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/frame.py", line 2935, in reindex return super(DataFrame, self).reindex(**kwargs) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/generic.py", line 3023, in reindex fill_value, copy).__finalize__(self) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/frame.py", line 2870, in _reindex_axes fill_value, limit, tolerance) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/frame.py", line 2878, in _reindex_index tolerance=tolerance) File "/usr/local/anaconda2.4.2/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 2993, in reindex raise ValueError("cannot reindex a non-unique index " ValueError: cannot reindex a non-unique index with a method or limit Closing remaining open files:/home/jacoob/workStation/extraProject/dataSet/ukdale.h5...done

Some one help me ?

py36 problem

'dict' object has no attribute 'iteritems', should be items, please have a check and modify it.

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.