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

Channel Error #3

Open
jokn1902 opened this issue Nov 24, 2020 · 1 comment
Open

Channel Error #3

jokn1902 opened this issue Nov 24, 2020 · 1 comment

Comments

@jokn1902
Copy link

Hello,
first, thank you very much for providing your code here. I would like to use it to calculate the Brain Symmetry Index for a chronic stroke subject. I recorded a 64 channel EEG but had to remove some channels during preprocessing so effectively there were 59 channels left the dataset. When I tried to run the code (featx=connectivity_features(x, Fs), all default settings) it produced error: at least two channels needed for analysis. I preprocessed the data in EEGLAB, could this be a problem with the data format? Is there a way to solve this problem? I would be grateful for any suggestions.

Thank you very much, Franziska

@otoolej
Copy link
Owner

otoolej commented Nov 25, 2020

Hi @jokn1902, probably better to generate the BSI through the generate_all_features.m function, by first setting the parameters in the neural_parameters.m file. But can of course do it directly from the connectivity_features.m function too. To do this,

x = randn(2, 10000);
Fs=1;
ch_labels = {'F3', 'F4'};

featx = connectivity_features(x, Fs, 'connectivity_BSI', [], ch_labels);

which will generate the BSI for 2-channels of GWN, 10000 samples long. Is important that x is size (N_channels x N). Also important to specify the channel labels (e.g. in ch_labels), as BSI is calculated from channel pairs on left/right hemispheres.
featx here is 1 x 4 vector, for each of the frequency bands (can set in neural_parameters.m). Make sense?

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

No branches or pull requests

2 participants