Skip to content
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

Improve channel selection #117

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

brianjohannes
Copy link
Collaborator

This adds tests for channel selection. I also confirmed that it is working online.

To test online, use real or mock EEG data and an instance of Bessy Unity (I used MI), run mi_unity_backend.py and confirm that after training, when you hit "s" and python does its classification it says in the terminal "bci_essentials.classification.mi_classifier : The shape of X is (11, 4, 512)" where the middle number is the number of channels in the optimal subset (in this case 4). You can tell what is the best subset by the terminal output when record_performance = True. You should see a table printed which shows the subsets and their accuracies. For example in the following table, OzP4PO8Pz, is the best subset, so there are 4 channels in the optimal subset.

Step Time N Channels Channel Subset Unique Combinations Tested in Step Accuracy Precision Recall
1 1 0.256476 1 Oz 8 0.651685 0.651685 0.651685
2 2 0.512817 2 OzP4 7 0.715356 0.715356 0.715356
3 3 0.795229 3 OzP4Pz 6 0.704120 0.704120 0.704120
4 4 1.081679 4 OzP4PO8Pz 5 0.865169 0.865169 0.865169

Tests max_time, min/max channels, and performance delta stopping conditions.

Tests are passing.
Channel selection is working online. Something in Bessy seems broken though.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant