Code Monkey home page Code Monkey logo

distributedcodingbrain's Introduction

DistributedCodingBrain

Code for my upcoming paper "Searching through functional space reveals distributed visual, auditory, and semantic coding in the human brain" (under review; preprint: https://www.biorxiv.org/content/10.1101/2020.04.20.052175v1)

Instructions for use of the new method:

  1. Make an empty directory for the data. This will be the directory that all of the data will be kept in.

  2. Download the Sherlock fMRI dataset into that directory(https://dataspace.princeton.edu/jspui/handle/88435/dsp01nz8062179). This should create the folder "movie_files" within the directory you just made.

  3. Edit cfg.py and use the path of the directory you just made for the value of the variable "data_dir."

  4. Run python split.py to split the data into two halves, one set used for training the Shared Response Model and one set used for the main analyses.

  5. Run python functional_space.py to convert the sherlock test data form anatomical space to functional space.

  6. To run a standard anatomical searchlight analysis described in the paper, run python anatomical_searchlight.py <subject_number> where subject_number is a number from [0,15] indicating the subject you want to run, kernel is one of {'sensory_rsa','semantic_decoding'} indicating the analysis you want to run (similarity analysis with deep learning models and semantic vector decoding respectively), and labels is one of {'alexnet','kellnet'} if kernel is 'rsa' (to choose the deep learning model you want to use). If kernel is "decode" then choose avg_100dim_wordvec_mat_Sep12.npz as label.

  7. To run a standard functional searchlight analysis described in the paper, run python functional_searchlight.py <subject_number> in the same fashion as step 6. Make sure you do step 5 before doing this.

  8. To see the functional searchlight results in anatomical space, run python warp_functional2anatomical.py <subject_number> where subject_number is a number from [0,15] indicating the subject whose results you want to warp and kernel is one of {'sensory_rsa','semantic_decoding'} indicating the analysis you want to warp the results for.

The Representational Similarity Matrices (RSM's) for the deep learning models have been provided in the rsm folder as well as the labels. The code to calculate the RSM's can be found in "get_alexnet_video_activations.py" and "get_kell_audio_activations.py." The networks can be found in "alexnet.py" and "branched_network_class.py."

distributedcodingbrain's People

Contributors

sreejank avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.