-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.py
24 lines (20 loc) · 798 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Example usage"""
from nilmtk import DataSet
from nilmtk.elecmeter import ElecMeterID
import nilmtk_complexity
import tracebase_complexity
# On REDD dataset using NILMTK API
print("ON REDD")
ds = DataSet('../../Datasets/REDD/redd.h5') # Path to REDD .h5 dataset
elec = ds.buildings[2].elec
meterkeys = [4, 6, 9, 10]
mgroup = elec.from_list([ElecMeterID(elec[m].instance(),elec.building(),elec.dataset()) for m in meterkeys])
print(nilmtk_complexity.compute(mgroup))
# On Tracebase dataset
print()
print("ON TRACEBASE")
pathlist = ['../../Datasets/Tracebase/Complete/Coffeemaker',
'../../Datasets/Tracebase/Complete/Refrigerator',
'../../Datasets/Tracebase/Complete/TV-LCD',
'../../Datasets/Tracebase/Complete/PC-Desktop']
print(tracebase_complexity.compute(pathlist))