Skip to content

Python code explaining why Canonical Correlation Analysis (CCA) works in detecting Steady State Visually Evoked Potentials (SSVEP).

License

Notifications You must be signed in to change notification settings

vpKumaravel/ssvep_cca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssvep_cca

Python code explaining why Canonical Correlation Analysis (CCA) works in detecting Steady State Visually Evoked Potentials (SSVEP).

Data

The data used in this repository is freely available here

Example

I used the dataset data_s19_64.mat and set the block ID to 2; frequency = 12 Hz; condition = low depth. The plot shows the comparison when using reference signals of 8 Hz, 12 Hz, and 16 Hz. As can be seen, despite the attempts to find linear combinations of a multi-channel EEG data for each of the reference signals, the target frequency (12 Hz) achieves the highest canonical correlation.

Fig03_3frequencies

In the script cca_tutorial_02.py, we investigate how much each channel contributed to reach the higher correlation for 12 Hz target frequency.

Fig04_CCA_Weights_Bar

Now, we can also plot the Topography of these channel activations.

Fig05_CCA_Weights_Topo

Disclaimer: I tried my best to find the EEG channel locations for the Neuroscan 64-channel setup. The results show activations in the Parietal-Occipital area (lateralized), which matches our expectations. However, I am not 100% sure about the channel locations used. If you find this to be wrong, feel free to submit a PR with the correct locations.

About

Python code explaining why Canonical Correlation Analysis (CCA) works in detecting Steady State Visually Evoked Potentials (SSVEP).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages