fahrenfort / ADAM

the Amsterdam Decoding And Modeling (ADAM) toolbox
Other
37 stars 15 forks source link

Questions and feature / pull request #157

Closed sari-saba-sadiya closed 2 years ago

sari-saba-sadiya commented 2 years ago

Hi,

I am doing some EEG processing and have found your tool to be very useful. There are however a few functionalities that can be useful but aren't implemented, I was wondering if there was a reasoning behind what you chose to include and exclude from your pipeline. Additionally, do you have any design recommendations/preferences if I was to implement these functionalities on my own and push a merge request?

  1. Labs like Steven Luck's usually average multiple trials to increase signal-noise ratio, is there a way of doing this in ADAM? If not is there a theoretical reason?
  2. Is there a way to average statistics of multiple classifiers? For instance, if one has 3 subjects and 4 orientations (60 deg, 120, 210, 330) but wants to decode only orientations that are 90 degrees apart (60 vs 330 and 120 vs 210) and do group level cluster-based permutation testing. Currently, we "double" the subjects and do a single classifier for 6 subjects, can the same result be achieved without this workaround?
  3. Is there a way to load eeglab datasets directly in ADAM? currently, we convert these data to a MAT file, but I assume this functionality already exists and I just failed to figure it out.

Thank you very much!

fahrenfort commented 2 years ago

Hi Sari,

See responses below:

Labs like Steven Luck's usually average multiple trials to increase signal-noise ratio https://www.jneurosci.org/content/38/2/409.long, is there a way of doing this in ADAM? If not is there a theoretical reason?

Yes you can do that using cfg.bintrain = ‘yes’ and/or cfg.bintest = ‘yes’ when calling adam_MVPA_firstlevel (although I can’t guarantee that these still work well, haven’t used them in ages). However, my experience is that binning (as averaging trials is sometimes referred to) is not very helpful in EEG decoding. Although your accuracies may go up, your standard deviations also go up, so in the end you may actually be worse off. This can clearly be seen in figure 8 of Grootswagers, T., Wardle, S. G., & Carlson, T. A. (2017). Decoding Dynamic Brain Patterns from Evoked Responses: A Tutorial on Multivariate Pattern Analysis Applied to Time Series Neuroimaging Data. Journal of Cognitive Neuroscience, 29(4), 677–697. http://doi.org/10.1162/jocn_a_01068 In that figure you can see that the version without averaging has the lowest accuracies, but at the same time the largest extent of significant windows (discs at bottom, i.e. showing best SNR for unaveraged trials).

Is there a way to average statistics of multiple classifiers? For instance, if one has 3 subjects and 4 orientations (60 deg, 120, 210, 330) but wants to decode only orientations that are 90 degrees apart (60 vs 330 and 120 vs 210) and do group level cluster-based permutation testing. Currently, we "double" the subjects and do a single classifier for 6 subjects, can the same result be achieved without this workaround?

I don’t understand your question, but if you want to average statistics of different classifiers you can use the adam_average_MVPA_stats function (just type: help adam_average_MVPA_stats in the Matlab Command Window)

Is there a way to load eeglab datasets directly in ADAM? currently, we convert these data to a MAT file, but I assume this functionality already exists and I just failed to figure it out.

Yes, just replace the MAT files you currently use with the EEGLAB files (provided they have the same name). ADAM will first try to load in EEGLAB .set files, if it can’t find those it will try to read in .MAT files (you don’t need to specify extension in your filename specs). Just read the manual, in this case you can find the relevant information by typing help adam_MVPA_firstlevel in the Matlab Command Window).

Hope this helps, but do try to read the documentation a bit before asking for help, as all these questions are clearly answered in the help files.

Cheers,

Johannes

fahrenfort commented 2 years ago

Not clear why an "issue" was opened, just read the manual please.