A Python Toolbox for Cross-Temporal Representational Similarity Analysis-based Decoding on E/MEG Data
Project description
# PyCTRSA
[![PyPI version](https://img.shields.io/pypi/v/pyctrsa?style=flat-square)](https://pypi.org/project/pyctrsa/) [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
#### A Python toolbox for Cross-Temporal Representation Similarity Analysis (RSA)-based Decoding on EEG/MEG data
## Download > pip install pyctrsa
## Required Dependencies
[Numpy](https://www.numpy.org): a fundamental package for scientific computing.
[SciPy](https://www.scipy.org/scipylib/index.html): a package that provides many user-friendly and efficient numerical routines.
[Matplotlib](https://matplotlib.org): a Python 2D plotting library.
[NeuroRA](https://zitonglu1996.github.io/NeuroRA/): a Python toolbox for multimode neural data Representation Analysis.
## Hightlight In traditional RSA, we can only use a coding model RDM to fit the RDMs from neural data time by time. So, can we do cross-temporal decoding based on RSA?
CTRSA-based decoding is a new algorithm for cross-temporal E/MEG decoding by RSA. We use the neural data from two different time-points to establish a Cross-Temporal Representatonal Dissimilarity Matrix (RDM) corrsponding to time i and time j. By this train of thought, we can obtain Number_of_Times by Number_of_Times Cross-Temporal RDMs. Then we can establish a Coding Model RDM by the experimental hypothesis. Finally, we can calculate the similarity between this Coding Model RDM and the Number_of_Times by Number_of_Times Cross-Temporal RDMs and obtain the cross-temporal decoding results.
## Notes In PyCTRSA, you can not only calculate the cross-temporal similarities based on this novel methods to realize decoding, but also calculate the cross-temporal similarities based on neural data under two different conditions to see the similar data patterns between two conditions and calculate the cross-temporal similarities based on normal RDMs to see the similar representational patterns between different time-points.
## Features
1. Calculate the Cross-Temporal RDM (Novel here!)
> calculate CTRDMs for a single channel/subject > calculate CTRDMs for multi-channels&subejcts
2. Calculate the similarity between two CTRDMs (Novel here!)
> by Pearson Correlation/Spearman Correlation/Kendall tau Correlation/Cosine Similarity/Euclidean Distance
3. Calculate the Cross-Temporal Similarities
> calculate CTSimilarities between neural data under two conditions > calculate CTSimilarities based on normal RDMs > calculate CTSimilarities between CTRDMs and a Coding Model RDM (Novel here!)
4. Plot the Results
> plot the CTRDM > plot the CTSimilarities > plot the time-by-time similarities
## How to use PyCTRSA
## Efficiency of using PyCTRSA
Here, we use a tutorial to compare the traditional classification-based decoding and novel cross-temporal RSA-based decoding below:
## About PyCTRSA
This work should be affilliated with [NeuroRA](https:/zitonglu1996.github.io/NeuroRA/), but it is an independent part.
If you have any question, find some bugs or have some useful suggestions while using, you can email me and I will be happy and thankful to know.
>My email address: >zitonglu1996@gmail.com / zitonglu@outlook.com
>My personal homepage: >https://zitonglu1996.github.io
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyctrsa-0.1.0.tar.gz
.
File metadata
- Download URL: pyctrsa-0.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df49d2391477c6d829ebf4c672eab0196e56a2d7178be91d651504f612fae671 |
|
MD5 | c4fe7f30c5640c752f79d2dd87f044e8 |
|
BLAKE2b-256 | ca6b353ddda1a466fc812e630b9b714f072360a57ca4bb29ef2aaaa5c525b893 |
File details
Details for the file pyctrsa-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pyctrsa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a8ee1f00b7b840413e07a543e0728326db56d3d4dceed60236d3742f418ae3c |
|
MD5 | 63e96c121ee52d070ba8a53cb2c64c62 |
|
BLAKE2b-256 | 308b419b0373ee5a26ee1b4d75a916f18cfaebe9486a56fbba37caea34582845 |