Representational Similarity Analysis in mne

Hello all,

I hope this email finds you well.
I am preparing to implement Representational Similarity Analysis on MEG data. I would like to compute the DSMs using cross-validated euclidean distances between items.

I have noticed that the Representational Similarity Analysis in the mne examples is based on decoding estimates, and was wondering if anyone can point me towards an example that uses euclidean distances to compose the DSMs, or offer some guidance on how to set this up in mne-python.

Many thanks!

Ana Pesquita

:question: If you have a question or issue with MNE-Python, please include the following info:

  • MNE version: e.g. 0.24.0
  • operating system: e.g. macOS 12 / Windows 10 / Ubuntu 18.04

:page_facing_up: Please also provide relevant code snippets – ideally a minimal working example (MWE).

:fountain_pen: To get the correct formatting, paste your Python code, then select it, and click on the Preformatted text toolbar button.

:no_mobile_phones: Please avoid sharing screenshots of code and error messages! Screenshots are difficult to work with especially on mobile devices; they don’t allow others to copy code and other text; and they don’t show up in the search.

:point_right: :point_right: :point_right: Please edit or remove the above text before submitting your posting. :point_left: :point_left: :point_left:

can you point to paper that does this to have more details on the method?

Alex

Dear Alexandre,

Thank you for your reply.

In this paper computes the DSMs are computes using euclidean distance as a measure:
https://doi.org/10.1016/j.neuroimage.2019.03.031
Please see section 2.7.3 for the description on how DSMs were computed.

Radoslaw M. Cichy, Nikolaus Kriegeskorte, Kamila M. Jozwik, Jasper J.F. van den Bosch, Ian Charest,
The spatiotemporal neural dynamics underlying perceived similarity for real-world objects,
NeuroImage, Volume 194, 2019, Pages 12-24, ISSN 1053-8119, Redirecting.

However, it seems like there is no cross-validation. I am looking for a description on how to implement cross-validation. Will get back to you on that.

Meanwhile, do you have any tips you could share on how to generate a DSM in mne-python using euclidean distance as the measure of dissimilarity.

Many thanks!

Ana P

If I’m not mistaken, @wmvanvliet’s MNE-RSA allows you to do that:

  • Use cross-validated distance metrics when computing DSMs

Could you take a look at this project?

1 Like

Dear Richard,

Thank you for this suggestion.
I am looking into this option!

Cheers,

Ana P

1 Like

I’ve added a cross-validation example to the MNE-RSA docs: Using cross-validation when computing DSMs — mne-rsa 0.6 documentation

2 Likes

Hello all,

For future reference, there are two options to compute cross-validated DSMs with euclidean/correlation based measures.

  1. MNE-RSA docs: Using cross-validation when computing DSMs — mne-rsa 0.6 documentation

  2. Guggenmos, M., Sterzer, P., & Cichy, R. M. (2018). Multivariate pattern analysis for MEG: a comparison of dissimilarity measures. NeuroImage. DOI: 10.1016/j.neuroimage.2018.02.044
    megmvpa/python_distance.ipynb at master · m-guggenmos/megmvpa · GitHub

Thank you for the help and suggestions!