OdysseasKr / neural-disaggregator

Code for NILM experiments using Neural Networks. Uses Keras/Tensorflow and the NILMTK.
MIT License
138 stars 57 forks source link

Wrong call for the f1 score? #6

Closed GiorgioCrasto closed 5 years ago

GiorgioCrasto commented 5 years ago

in DAE-example.ipynb the F1 score should be called with rpaf[3]? It should be .45701927 for the example given.

import metrics rpaf = metrics.recall_precision_accuracy_f1(predicted, ground_truth) print("============ Recall: {}".format(rpaf[0])) print("============ Precision: {}".format(rpaf[1])) print("============ Accuracy: {}".format(rpaf[2])) print("============ F1 Score: {}".format(rpaf[2]))

print("============ Relative error in total energy: {}".format(metrics.relative_error_total_energy(predicted, ground_truth))) print("============ Mean absolute error(in Watts): {}".format(metrics.mean_absolute_error(predicted, ground_truth)))

OdysseasKr commented 5 years ago

You are right. Same for the rest of the ipynd. If you have corrected this, feel free to submit a pull request. Otherwise, I am going to fix this in the following days.

Thank you for submitting the issue :+1:

GiorgioCrasto commented 5 years ago

Hi! thanks for the prompt replay. Unfortunately I don't have access to the REDD database since I am not part of an academic institute so I cannot test my changes at that level of the notebook. I am trying to re run the notebook with the UKDALE dataset but I am getting into another trouble with the metadata of the hdf5 file. So if you like to make the change by your self feel free to do it; I am not ready yet. Many thanks again :)