Repository navigation
Description
Beetl2021_A and Beetl2021_B read the final phase's test labels from final_MI_label.txt (figshare 21602622). They annotate those labels with the same 4-class event map as the training run. The competition's test labels have only three classes, so in each dataset one test class is loaded under the wrong name.
What the competition's labels mean
For the motor imagery task, the BEETL starter kit's final testing guide gives the classes to predict as:
- Dataset A: rest (0), left hand (1), other (2)
- Dataset B: left hand (0), right hand (1), other (2)
The leaderboard guide has the same table. The example submission, final_pred_MI_label_example.txt, holds only 0, 1 and 2, and the evaluation notebook scores against final_MI_label.txt.
What MOABB does
- Beetl2021_A uses
{"rest": 0, "left_hand": 1, "right_hand": 2, "feet": 3}for both runs (L373, L423, L441). So the test run's "other", which is right hand or feet, loads asright_hand. - Beetl2021_B uses
{"left_hand": 0, "right_hand": 1, "feet": 2, "rest": 3}(L796, L880, L893). So the test run's "other", which is feet or rest, loads asfeet.
These permalinks are at 555d14a; beetl.py on develop is unchanged since.
What it looks like
Beetl2021_A, final phase, loaded at 555d14a with MotorImagery() and all four classes:
| Subject | rest | left_hand | right_hand | feet |
|---|---|---|---|---|
| 1 | 75 | 74 | 124 | 25 |
| 2 | 73 | 75 | 125 | 25 |
| 3 | 75 | 75 | 124 | 24 |
These counts fit 25 trials per class in the five training races, plus a test run of 50 rest, 50 left hand and 100 "other". right_hand ends up with five times as many trials as feet. In a left- vs right-hand evaluation, about 100 of each subject's ~125 right_hand trials are right hand or feet, in an unknown mix. I haven't loaded Beetl2021_B, but the same reading applies to its feet trials.
Possible fix
Read the test run with its own 3-class map. For each dataset, either drop the "other" trials or give them an event name that no paradigm selects by default, such as right_hand_or_feet for A and feet_or_rest for B. The docstrings could also say that the test run has three classes.
Two smaller things noticed while reading
- Units: Beetl2021_B scales its data by
1e-6(L881, L909), but Beetl2021_A does not (L424, L457). B's scaling implies its files are in µV. Are A's already in volts? If they are in µV too, A loads them 10⁶ times too large. - Last trial of each run: each subject loads 298 of its 300 trials. The 4 s trials are concatenated back to back, and
interval=[0, 4](L375) needs one sample past 4 s, since MNE includestmax. So the last trial of each run seems to run past the end of the data and is dropped. Pan2023 and Pan2025 end their window one sample early, withinterval=[0, 4 - 1 / 250](pan2025.py L131), and[0, 4 - 1 / 500]would do the same here.
Activity
Fix Beetl2021_A/B loading the 3-class final test labels with the 4-cl…