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.
├── 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
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.
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
Logs and pretrained models are available here.
This project belongs to the team ASA_GANG
with members:
- Alicia Milloz: @Alicia-max
- Sevda Öğüt: @ogutsevda
- Alexandre de Skowronski: @alexdesko
Many thanks to Mi Xue Tan for providing the data, feedback, and in general a great supervision.