Git Product home page Git Product logo

pls-films-fmri's Introduction

Behavioral Partial Least Square Correlation (PLSC) to analyze the role of different components in the CPM model

Background

This repository contains the code for a project conducted under the supervision of members of the MIP:lab. We aim to probe the role of appraisal in emotion experience by conducting three PLSC analyses:

  • using discrete emotions and brain activity (fMRI).
  • using appraisal items and brain activity (fMRI).
  • using appraisals and discrete emotions.

The overall aim is to compare each model in order to assess the relationship between appraisal and discrete emotions at the level of brain activation during the experience of an emotional event

Behavioral PLSC is a widely used technique for neuroimaging, as highlighted by review article by Krishnan. This package has been largely adapted from the Matlab toolbox and draws inspiration from a Python interface for partial least squares (PLS) analysis.

However, while the Matlab toolbox has a significant number of tools dedicated to integrating neuroimaging-specific paradigms and aims to optimally relate neuroimaging to behavioral data for different types of neuroimaging data formats, the current Python code has been adapted to suit the specific needs of the current project, including data loading, pre-processing, PLSC analysis, and plots.

Implementation

analysis_PLS.py contains the main function initiates the BehavPLS classes and run the PLSC analysis for two first model. More specifically, this files takes as an input argument a condig file that contains all the parameters of the BehavPLS class to run and load the results into pkl format. See the directory configs/.

Emotion_PLS.py contains the main function initiates the third PLS models (with Appraisals & Discrete items).

BehavPLS.py contains class to wrap the dataset (brain & behavior data).

compute.py contains functions for the pre-processing of the data as well as for the PLS methods.

plot.py contains plotter function to visualize the results.

visualization.ipynb to visualize the results.

Libraries

numpy
sklearn
nilearn
nibabel pickle
scipy
pandas
matplotlib\

How to use

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

python3 analysis_PLS.py --config config/test.yaml

Acknowledgments

Many thanks to Elenor Morgenroth for providing the data, feedback, and in general a great supervision and Alessandra Griffa for guiding me through the static PLS background.

pls-films-fmri's People

Contributors

alicia-max avatar

Watchers

 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.