-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed ampds converter #850
base: master
Are you sure you want to change the base?
Conversation
Relates to #682 |
CSV files are not anymore available for download on the AMPds2 website. This makes this converter obsolete already :(. @klemenjak @PMeira Should we try to update to use the |
@levaphenyl You have to select the original files from the download menu in the file list: This download (ZIP file) includes all CSVs, the HDF5 file, and the equipment manuals. The .h5 itself is kind of small (maybe resampled?), but if it indeed works and provides the same data, we can at least recommend it. By the way, we should to keep the original converter (v1) since it is important for historical purposes and reproducibility. Nothing against adding the new one, of course. |
Useless alarm, sorry 🤦. Thank you for the hint @PMeira!
If I understand it well, the ideal converter would be able to deal with both v1 and v2 or we need 2 separate files and a lot of duplicated code :D. |
gt_temp = np.where(gt_temp<threshold,0,1) | ||
pred_temp = np.array(app_pred) | ||
pred_temp = np.where(pred_temp<threshold,0,1) | ||
return matthews_corrcoef(gt_temp, pred_temp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matthews_corrcoef
is missing from the imports in this file, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I will resolve this problem. Thanks!
@levaphenyl Yeah... In this case the differences are not that large (from @klemenjak's commits, column changes and some metadata), so a single converter looks feasible. Several of the converters have duplicated code, developing a base class/module with most of the common code would be useful later. That probably would be required to abstract some of the HDF5 aspects away too. Given the current state of things, I think it would be fine to |
TIMEZONE = "America/Vancouver" | ||
|
||
def convert_ampds(input_path, output_filename, format='HDF'): | ||
""" | ||
Convert AMPds R2013 as seen on Dataverse. Download the files | ||
Convert AMPds2 R2016 as seen on Dataverse. Download the files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth to add a comment here to clarify how to download those, e.g. #850 (comment)
Hi,
I experienced some issues with the dataset AMPds2 and the new API. I found that the appliance types in the metadata were not correct, so I changed that. Also, I edited the converter for AMPds to fit the second version, which has more data.
Best,
Christoph