-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi @ZhangRaymond,
I really tried to recreate this dict, but I could not handle nilmtk/REDD adequately I think :( I'm sorry.
Please help me. I'd really like to try your code out.
Thank you.
import pickle
from nilmtk import DataSet, TimeFrame
import pandas as pd
datafolder = '/Users/alessandro/Documents/data/'
redd = DataSet(datafolder + 'redd.h5')
metadata = dict(redd.metadata)
deviceName = set()
appName = set()
mains={}
appliances={}
for i in range(1,7):
mains[i] = {}
for house in range(1,7):
print('house_',house)
elec = redd.buildings[house].elec
appliancelist = elec.appliances
mainsvalues = elec.mains().power_series_all_data()
mains[house]=mainsvalues
for app in appliancelist:
label = app.label('unknown')
print(' '*3,label)
appName.add(label)
appliances[house][label] = elec[label].power_series(ac_type='active')
deviceName = list(appName)
with open('house_{}.pickle'.format(house), 'wb') as file:
pickle.dump([deviceName], file)
print('End')
