If you specify events with names mapping to IDs, dn3 incorrectly maps the event name (string) to the classifier label, this fails with a KeyError like:
File "C:\tools\miniconda3\envs\eegtorch\lib\site-packages\dn3\data\dataset.py", line 433, in <lambda>
return np.apply_along_axis(lambda x: self.epoch_codes_to_class_labels[x[0]], 1,
KeyError: 108
The data in this case is stored in MNE fif files, and contains a stim channel with int markers which track a single sample where the stimuli was presented, I also tried using event IDs as a list without a name string, but the issue was the same.
this PR maintains the mapping but uses the value rather than the key for the mapping.
If you specify events with names mapping to IDs, dn3 incorrectly maps the event name (string) to the classifier label, this fails with a
KeyError
like:The data in this case is stored in MNE fif files, and contains a stim channel with
int
markers which track a single sample where the stimuli was presented, I also tried using event IDs as a list without a name string, but the issue was the same.this PR maintains the mapping but uses the value rather than the key for the mapping.
Sample config yaml: