Giter Club home page Giter Club logo

mvpa-fmri-analysis's Introduction

Decoding Brain States Triggered via Video Game with fMRI Based MVPA Approach

Summary

This repository contains the code and the report for the second project of CS-433 Machine Learning 2022 course at EPFL. This project was conducted under the supervision of members of the MIP:lab.
The goal is to classify fMRI brain images of subjects playing a video game that triggers predefined emotional states specified as the classes. Using different classification methods and visualization of the weights of the classifiers, this project allows to see which parts of the brain are responsible for a given emotional state.

File structure

├── configs
    ├── baseline_per_run.ini
    ├── baseline_per_subs.ini
    ├── decoder.ini
    ├── spacenet_graphnet.ini
    ├── spacenet_tvl1.ini
├── analysis_baseline.py
├── analysis_spacenet.py
├── dataset.py
├── generate_decoder.py
├── helpers.py
├── README.md
├── run.py
└── visualization.ipynb

Implementation

analysis_baseline.py contains a function that sequentially trains baseline models and logs the results.

analysis_spacenet.py contains a function that sequentially trains SpaceNet Classifiers with different 'alphas', logs the results and saves the models in a specified directory.

dataset.py contains class to wrap the dataset that data-specific helpers as methods.

generate_decoder.py contains a function that trains two Decoder (Linear SVC and Logistic Classifier), logs the results and saves them in a specific directory. Note that the implementation allows the training with only ONE set of parameters per decoder.

helpers.py contains helper functions for the cross validation of the models.

run.py containes parser functions and initiates a simulation. More specifically, this file takes as input argument a config file that contains all the parameters of the simulation to run. See the directory configs/.

visualization.ipynb contains plotter functions to visualize the results.

Libraries

numpy
sklearn
nilearn
nibabel

How to use

Example config files are available in the configs/ directory.
Simply run the following (as an example):

python run.py --config configs/baseline_per_run.ini

Pretrained models

Logs and pretrained models are available here.

Team Members

This project belongs to the team ASA_GANG with members:

Acknowledgments

Many thanks to Mi Xue Tan for providing the data, feedback, and in general a great supervision.

mvpa-fmri-analysis's People

Contributors

alexdesko avatar alicia-max avatar ogutsevda 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.