{"id":32175510,"url":"https://github.com/mne-tools/mne-rsa","last_synced_at":"2026-04-07T17:31:22.575Z","repository":{"id":42691620,"uuid":"194268560","full_name":"mne-tools/mne-rsa","owner":"mne-tools","description":"Representational Similarity Analysis on MEG and EEG data","archived":false,"fork":false,"pushed_at":"2026-04-06T20:49:25.000Z","size":19254,"stargazers_count":85,"open_issues_count":4,"forks_count":16,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T22:23:33.293Z","etag":null,"topics":["data-analysis","eeg","meg","mne-python","neuroscience"],"latest_commit_sha":null,"homepage":"https://mne.tools/mne-rsa","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mne-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-28T12:15:02.000Z","updated_at":"2026-03-31T06:27:23.000Z","dependencies_parsed_at":"2022-09-04T10:31:40.634Z","dependency_job_id":"3467e71f-383c-468f-95df-6a954e55b820","html_url":"https://github.com/mne-tools/mne-rsa","commit_stats":{"total_commits":170,"total_committers":5,"mean_commits":34.0,"dds":0.07058823529411762,"last_synced_commit":"d8d12210f490731dac3b36487830e8bc15766461"},"previous_names":["mne-tools/mne-rsa","wmvanvliet/mne-rsa"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mne-tools/mne-rsa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mne-tools%2Fmne-rsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mne-tools%2Fmne-rsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mne-tools%2Fmne-rsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mne-tools%2Fmne-rsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mne-tools","download_url":"https://codeload.github.com/mne-tools/mne-rsa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mne-tools%2Fmne-rsa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31522215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","eeg","meg","mne-python","neuroscience"],"created_at":"2025-10-21T19:40:40.312Z","updated_at":"2026-04-07T17:31:22.567Z","avatar_url":"https://github.com/mne-tools.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNE-RSA\n\n[![Unit tests](https://github.com/mne-tools/mne-rsa/workflows/unit%20tests/badge.svg)](https://github.com/mne-tools/mne-rsa/actions?query=workflow%3A%22unit+tests%22)\n[![docs](https://github.com/mne-tools/mne-rsa/workflows/build-docs/badge.svg)](https://github.com/mne-tools/mne-rsa/actions?query=workflow%3Abuild-docs)\n[![joss](https://joss.theoj.org/papers/224328eb22eab91aaae44579fb00fdaa/status.svg)](https://joss.theoj.org/papers/224328eb22eab91aaae44579fb00fdaa)\n\nThis is a Python package for performing representational similarity analysis (RSA) using [MNE-Python](https://martinos.org/mne/stable/index.html\u003e) data structures.\nThe main use-case is to perform RSA using a “searchlight” approach through time and/or a\nvolumetric or surface source space.\n\nRead more on RSA in the paper that introduced the technique:\n\nNikolaus Kriegeskorte, Marieke Mur and Peter Bandettini (2008).\nRepresentational similarity analysis - connecting the branches of systems neuroscience.\nFrontiers in Systems Neuroscience, 2(4).\n[https://doi.org/10.3389/neuro.06.004.2008](https://doi.org/10.3389/neuro.06.004.2008)\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"doc/rsa.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"doc/rsa_dark.png\"\u003e\n  \u003cimg src=\"doc/rsa.png\" width=\"600\"\u003e\n\u003c/picture\u003e\n\n\n## Use cases\n\nThis is what the package can do for you:\n\n-  Compute RDMs on arbitrary data\n-  Compute RDMs in a searchlight across:\n\n   -  vertices/voxels and samples (source level)\n   -  sensors and samples (sensor level)\n   -  vertices/voxels only (source level)\n   -  sensors only (sensor level)\n   -  samples only (source and sensor level)\n\n-  Use cross-validated distance metrics when computing RDMs\n-  And of course: compute RSA between RDMs\n\nSupported metrics for comparing RDMs:\n\n-  Spearman correlation (the default)\n-  Pearson correlation\n-  Kendall’s Tau-A\n-  Linear regression (when comparing multiple RDMs at once)\n-  Partial correlation (when comparing multiple RDMs at once)\n\n## Installation\n\nThe package can be installed either through PIP: `pip install mne-rsa`  \nor through conda using the conda-forge channel: `conda install -c conda-forge mne-rsa`\n\nInstalling through either channel will pull in [MNE-Python](https://mne.tools) as a dependency, along with [Qt 6](https://www.qt.io), [PyVista](https://pyvista.org) and [Scikit-Learn](https://scikit-learn.org). See [`requirements.txt`](requirements.txt) for the full list of packages.\n\n\n## Example usage\n\nBasic example on the EEG “kiloword” data:\n\n```python\nimport mne\nimport mne_rsa\n# Load EEG data during which many different word stimuli were presented.\ndata_path = mne.datasets.kiloword.data_path(verbose=True)\nepochs = mne.read_epochs(data_path / \"kword_metadata-epo.fif\")\n# Use MNE-RSA to create model RDMs based on each stimulus property.\ncolumns = epochs.metadata.columns[1:]  # Skip the first column: WORD\nmodel_rdms = [mne_rsa.compute_rdm(epochs.metadata[col], metric=\"euclidean\")\n              for col in columns]\n# Use MNE-RSA to perform RSA in a sliding window across time.\nrsa_results = mne_rsa.rsa_epochs(epochs, model_rdms, temporal_radius=0.01)\n# Use MNE-Python to plot the result.\nmne.viz.plot_compare_evokeds(\n    {column: result for column, result in zip(columns, rsa_results)},\n    picks=\"rsa\", legend=\"lower center\", title=\"RSA result\"\n)\n```\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"doc/rsa_result.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"doc/rsa_result_dark.png\"\u003e\n  \u003cimg src=\"rsa_result.png\" width=\"600\"\u003e\n\u003c/picture\u003e\n\n## Documentation\nFor a detailed guide on RSA analysis from start to finish on an example dataset, see the [tutorials](https://mne.tools/mne-rsa/stable/auto_examples/tutorials/index.html).\n\nFor quick guides on how to do specific things, see the [examples](https://mne.tools/mne-rsa/stable/auto_examples/index.html).\n\nFinally, there is the [API reference](https://mne.tools/mne-rsa/stable/api.html) documentation.\n\n## Integration with other packages\n\nThe main purpose of this package is to perform RSA analysis on MEG data.\nHence, integration functions with [MNE-Python](https://mne.tools) are provided.\nHowever, there is also some integration with [nipy](https://nipy.org) for fMRI that should well in a [nilearn](https://nilearn.github.io) setup.\n\n\n## Support\n\nThis free software comes without any form of official support.\nHowever, if you think you have encountered a bug or have a particularly great idea for improvements, please open an [issue on Github](https://github.com/mne-tools/mne-rsa/issues).\nFor questions and help with your analysis, you are welcome to post on the [MNE forum](https://mne.discourse.group/).\n\n## Contributing\n\nDevelopment of the package happens on [Github](https://github.com/mne-tools/mne-rsa) under the umbrella of MNE-tools.\nEveryone is welcome to raise [issues](https://github.com/mne-tools/mne-rsa/issues) or contribute [pull requests](https://github.com/mne-tools/mne-rsa/pulls) as long as they abide by our [Code of Conduct](https://github.com/mne-tools/.github/blob/main/CODE_OF_CONDUCT.md).\nFor more information about the ways in which one can contribute, see the [Contributing guide of MNE-Python](https://mne.tools/stable/development/contributing.html), which by and large applies to this project as well.\n\nHere is how to install the additional required packages for developing MNE-RSA and set up the package in development mode:\n\n```bash\ngit clone git@github.com:mne-tools/mne-rsa.git\ncd mne-rsa\npip install -r requirements-dev.txt\npip install -e .\n```\n\nTo run the test suite, execute `pytest` in the main `mne-rsa` folder.  \nTo build the documentation, execute `make html` in the `mne-rsa/doc` folder (or on\nWindows: `sphinx-build . _build/html`).\n\n## Citation\nIf you end up using this package for the data analysis that is part of a scientific\narticle, please cite:\n\nMarijn van Vliet, Stefan Appelhoff, Takao Shimizu, Egor Eremin, Annika Hultén, Yuanfang Zhao, and Richard Höchenberger, (2025). MNE-RSA: Representational Similarity Analysis on EEG, MEG and fMRI data. Journal of Open Source Software, 10(116), 9148, https://doi.org/10.21105/joss.09148\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmne-tools%2Fmne-rsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmne-tools%2Fmne-rsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmne-tools%2Fmne-rsa/lists"}