b3597c8089d653f7edf7a114138cad9dcea35335,nilmtk/dataset/redd.py,REDD,load_building,#REDD#,95
Before Change
labels = load_labels(building_dir)
// Remove dud channels
dud_channels_for_building = DUD_CHANNELS.get(building_number)
for chan in dud_channels_for_building:
labels.pop(chan)
// Convert appliance names from REDD to nilmtk standard names
After Change
labels = load_labels(building_dir)
// Remove dud channels
try:
dud_channels_for_building = DUD_CHANNELS[building_number]
except KeyError:
// DUD_CHANNELS doesn"t specify dud channels for all buildings
pass
else:
for dud_chan in dud_channels_for_building:
labels.pop(dud_chan)
// Convert appliance names from REDD to nilmtk standard names
appliance_metadata = {}
for chan, label in labels.iteritems():
nilmtk_appliance = APPLIANCE_NAME_MAP.get(label)
if nilmtk_appliance is not None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: nilmtk/nilmtk
Commit Name: b3597c8089d653f7edf7a114138cad9dcea35335
Time: 2014-01-06
Author: jack-list@xlk.org.uk
File Name: nilmtk/dataset/redd.py
Class Name: REDD
Method Name: load_building
Project Name: nilmtk/nilmtk
Commit Name: 7c2d0ffef764dc6f8f91f34d35589b91e8eca667
Time: 2015-08-17
Author: jack-list@xlk.org.uk
File Name: nilmtk/appliance.py
Class Name: Appliance
Method Name: on_power_threshold
Project Name: matthewwithanm/django-imagekit
Commit Name: 14bac58373d87ab4d90879b1654b62bf89603bc4
Time: 2011-11-02
Author: matthew@exanimo.com
File Name: imagekit/models.py
Class Name: _ImageSpecFileMixin
Method Name: _process_content