Esempio n. 1
0
def preprocess_iawe(building, freq):
    building.utility.electric = building.utility.electric.sum_split_supplies()
    building = prepb.filter_out_implausible_values(
        building, Measurement('voltage', ''), 160, 260)
    building = prepb.filter_datetime(building, '7-13-2013', '8-4-2013')
    building = prepb.downsample(building, rule=freq)
    building = prepb.fill_appliance_gaps(building)
    building = prepb.prepend_append_zeros(
        building, '7-13-2013', '8-4-2013', freq, 'Asia/Kolkata')
    building = prepb.drop_missing_mains(building)
    building = prepb.make_common_index(building)
    building = prepb.filter_top_k_appliances(building, k=6)
    return building
Esempio n. 2
0
dataset = DataSet()
dataset.load_hdf5("/home/nipun/Dropbox/nilmtk_datasets/iawe")

building = dataset.buildings[1]

# 1. sum together split mains and DualSupply appliances
building.utility.electric = building.utility.electric.sum_split_supplies()

# optional. (required for iAWE) remove samples where voltage outside range
# Fixing implausible voltage values
building = prepb.filter_out_implausible_values(
    building, Measurement('voltage', ''), 160, 260)

# optional. (required for iAWE) Note that this will remove motor as it does not have
# any data in this period
building = prepb.filter_datetime(
    building, '7-13-2013', '8-4-2013')

# 2. downsample mains, circuits and appliances
building = prepb.downsample(building, rule='1T')

# 3. Fill large gaps in appliances with zeros and forward-fill small gaps
building = prepb.fill_appliance_gaps(building)

# optional. (required for iAWE)
building = prepb.prepend_append_zeros(
    building, '7-13-2013', '8-4-2013', '1T', 'Asia/Kolkata')

# 4. Drop missing samples from mains
building = prepb.drop_missing_mains(building)

# TODO: for some datasets (e.g. UKPD), we'll have to find a common index