556bfe20bd5f08b1f841296aca064f126080cfd2,nilmtk/metrics.py,,rms_error_power,#,155
Before Change
n_samples = 0
for aligned_meters_chunk in align_two_meters(pred_meter,
ground_truth_meter):
diff = aligned_meters_chunk.icol(0) - aligned_meters_chunk.icol(1)
diff.dropna(inplace=True)
sum_of_squared_diff += (diff ** 2).sum()
n_samples += len(diff)
error[pred_meter.instance()] = math.sqrt(sum_of_squared_diff / n_samples)
return pd.Series(error)
After Change
n_samples = 0
for aligned_meters_chunk in align_two_meters(pred_meter,
ground_truth_meter):
diff = aligned_meters_chunk.iloc[:, 0] - aligned_meters_chunk.iloc[:, 1]
diff.dropna(inplace=True)
sum_of_squared_diff += (diff ** 2).sum()
n_samples += len(diff)
error[pred_meter.instance()] = math.sqrt(sum_of_squared_diff / n_samples)
return pd.Series(error)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances
Project Name: nilmtk/nilmtk
Commit Name: 556bfe20bd5f08b1f841296aca064f126080cfd2
Time: 2018-03-18
Author: 10246101+PMeira@users.noreply.github.com
File Name: nilmtk/metrics.py
Class Name:
Method Name: rms_error_power
Project Name: nilmtk/nilmtk
Commit Name: 556bfe20bd5f08b1f841296aca064f126080cfd2
Time: 2018-03-18
Author: 10246101+PMeira@users.noreply.github.com
File Name: nilmtk/metrics.py
Class Name:
Method Name: f1_score
Project Name: nilmtk/nilmtk
Commit Name: 556bfe20bd5f08b1f841296aca064f126080cfd2
Time: 2018-03-18
Author: 10246101+PMeira@users.noreply.github.com
File Name: nilmtk/metrics.py
Class Name:
Method Name: mean_normalized_error_power