Sorting leads in test_model.py script

82 views
Skip to first unread message

ryan clark

unread,
May 27, 2021, 1:55:00 PM5/27/21
to physionet-challenges
Hi Organizers,

I was wondering if there should be a sort_leads function after loading the leads on line 48 in the test_model.py script. When the leads are loaded into the required lead set, they are sorted, but they aren't sorted when the individual header for testing is loaded. For example, when testing my six lead model, the dictionary required_lead_sets stores the leads as ('I', 'II', 'III', 'aVR', 'aVL', 'aVF'), however the header stores the leads as ('I', 'II', 'III', 'aVL', 'aVR', 'aVF'). This causes a keyerror when trying to load the model. Sorting the leads when the header for the individual testing example would solve this problem.

Thanks,
Ryan

PhysioNet Challenge

unread,
May 27, 2021, 1:57:45 PM5/27/21
to physionet-challenges
Dear Ryan,

Good observation. I updated the test_model.py script to sort the leads more consistently when loading the models.

As you noticed, the order of the leads in the header and signal files doesn't actually matter, i.e., it's the same information, so this is just a way to consistently identify the models corresponding to the different lead combinations.

Best,
Matt
(On behalf of the Challenge team.)

https://PhysioNetChallenges.org/
https://PhysioNet.org/

Please post questions and comments in the forum. However, if your question reveals information about your entry, then please email challenge at physionet.org. We may post parts of our reply publicly if we feel that all Challengers should benefit from it. We will not answer emails about the Challenge to any other address. This email is maintained by a group. Please do not email us individually.
Reply all
Reply to author
Forward
0 new messages