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

Add an SSVEP classification algorithm as a new feature #12630

Open
SparklingWasser opened this issue May 28, 2024 · 3 comments
Open

Add an SSVEP classification algorithm as a new feature #12630

SparklingWasser opened this issue May 28, 2024 · 3 comments
Labels

Comments

@SparklingWasser
Copy link

Describe the new feature or enhancement

Hi,

I recently have been looking for a Python library for SSVEP classification, but it seems that there is no such major one offering this feature. Thus, I am writing a function myself and was wondering if it would be okay to include this to MNE, for people like me to benefit from this.

Currently, the most of the public scripts for SSVEP classification are written in MATLAB, and the only SSVEP classification method in MNE (using epochs.compute_psd) is based on PSD, which is suitable to grasp a basic concept of SSVEP classification but not practical.

Describe your proposed implementation

Canonical correlation analysis (CCA) (Lin 2006) and multivariate synchronization index (MSI) (Zhang 2014) are the two decent methods to classify SSVEP responses without requiring training dataset. These find a spatial filter to maximize the correlation between multi-channel EEG data and the reference signals (sine or cosine waves with stimulation frequencies). CCA is probably the most popular algorithm for SSVEP classification, and also most of the state-of-the-art algorithms are based on this (Wong 2021, Nakanishi 2018). MSI is less popular, but it always showed a better performance in my experience.

I guess this would best fit under mne.decoding as a new class. The name can be mne.decoding.SSVEPClassification, for example. It would process mne.Epochs and yield the stimulation index as an output.

Describe possible alternatives

To the best of my knowledge, it is best option to create a new class to add this feature.

Additional context

No response

Copy link

welcome bot commented May 28, 2024

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴

@agramfort
Copy link
Member

agramfort commented May 28, 2024 via email

@SparklingWasser
Copy link
Author

SparklingWasser commented May 29, 2024

It would be ideal if we can use a public benchmark dataset by Wang 2016.
It is widely used one in the field, but is written in .mat format and is already epoched into trials (no continuous raw dataset available).
Data from one participant (around 100 MB) is enough.

Otherwise, we can use the public dataset from me, which is also .mat format but continuous raw data with all event markers available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants