626173412d4281b693244e0705a787c4e7c08031,nilmtk/metrics.py,,fraction_energy_assigned_correctly,#Any#Any#,69
Before Change
fraction = np.array([])
total_energy_predicted = np.sum(predicted_power.values)
for appliance in predicted_power:
appliance_energy_predicted = np.sum(predicted_power[appliance].values)
appliance_energy_ground_truth = np.sum(
df_appliances_ground_truth[appliance].values)
total_energy_ground_truth = np.sum(df_appliances_ground_truth.values)
fraction = np.append(
fraction, np.min(
[appliance_energy_predicted / total_energy_predicted,
appliance_energy_ground_truth /
total_energy_ground_truth
]))
return np.sum(fraction)
def mean_normalized_error_power(predicted_power, df_appliances_ground_truth):
After Change
fraction_per_meter_ground_truth = ground_truth_submeters.fraction_per_meter()
fractions = []
for meter_instance in predictions_submeters.instance():
fraction = min(fraction_per_meter_predictions[meter_instance],
fraction_per_meter_ground_truth[meter_instance])
fractions.append(fraction)
return sum(fractions)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: nilmtk/nilmtk
Commit Name: 626173412d4281b693244e0705a787c4e7c08031
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: fraction_energy_assigned_correctly
Project Name: nilmtk/nilmtk
Commit Name: 626173412d4281b693244e0705a787c4e7c08031
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: fraction_energy_assigned_correctly
Project Name: nilmtk/nilmtk
Commit Name: f0e38a44c09452fc4675681a4e45c3c69612c791
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: error_in_assigned_energy
Project Name: nilmtk/nilmtk
Commit Name: b523b464d8cafe29e352981c1c6df941f205592a
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: mean_normalized_error_power