Skip to content

Latest commit

 

History

History
63 lines (32 loc) · 2.52 KB

readme.md

File metadata and controls

63 lines (32 loc) · 2.52 KB

EEG_Decoder

This is a (hopefully) flexible package for decoding epoched EEG data in Python. It includes support for loading and managing EEG data (in .mat format), processing epoched data, cross validation, classification, and visualization with statistical testing. While most of the functionality is geared towards within-subject, timepoint by timepoint analyses, this package also supports cross-session and cross-subject classification. While this is primarily meant to be useful for members of the Awh/Vogel Lab, we hope that it is general for use by others. This package is currently being developed, use at your own risk! Always check your code, look up functions, and reach out to us if you have questions!

Additionally, it should support representational similarity analysis (RSA) using crossnobis distance metrics, as well as support fitting and visualizing custom models, as well as using these distances as inputs for a MDS projection

eeg_decoder.py

Experiment

Organizes and loads in EEG, trial labels, behavior, eyetracking, and session data.

Experiment_Syncher

Synchronizes data between different experiments. Particularly useful for participants who completed multiple sessions or experiments.

Wrangler

Data processing and cross-validation.

Classifier

Classification and storing of classification outputs.

Interpreter

Visualization and statistical testing.

ERP

Visualization of EEG data.

similarity_analyses.py

RDMFileHandler

Handles saving and reading RDM data as a hdf5 file. Largely used by other classes

Crossnobis

Handles calculation of pairwise crossnobis distances between conditions.
Calculates within subject and timepoint

RSA

Handles fitting of theoretical models to the empirical RDM, as well as visualizations (within and across timepoints)

MDS

Calculates and visualizes MDS projections from crossnobis distances. Also supports making animated gifs.

decode_load_1vs3.ipynb

Most basic use case for EEG-decoder. Load data from experiment, decode set size 1 vs 3, then plot accuracy and confusion matrix.

decode_load_cross_experiment.ipynb

Use the Experiment_Syncer class to synchronize subject data across multiple experiments. Also uses train_test_custom_split. Train on Exp1 and Exp2, and use that model to decode set size 1 vs 3 in Exp3.

hyperplane_1vs3_with_2.ipynb

Use the train_labels input to only train on 1 and 3, while testing on 1, 2, and 3. Plot the output of set size 2 trials with the 'plot_hyperplane' function.