Coder Social home page Coder Social logo

neuro's Introduction

Dictionary Learning and GUI-based Labeling

This script performs fMRI data processing using the DictLearning algorithm from the nilearn package. It allows you to specify the number of subjects and components as command-line arguments.

Getting Started

Labeling App

usage: app.py [-h] [-s] n_subjects n_components

positional arguments:
  n_subjects    number of subjects
  n_components  number of components

options:
  -h, --help    show this help message and exit
  -s, --save    save '.nii' files
python app.py <N_SUBJECTS> <N_COMPONENTS>
python app.py 30 200

Viewer App

usage: viewer.py [-h] [--smoothing_fwhm SMOOTHING_FWHM] [--memory MEMORY] [--memory_level MEMORY_LEVEL] [--random_state RANDOM_STATE]
                 [--standardize STANDARDIZE] [--n_jobs N_JOBS]
                 n_subjects n_components method

positional arguments:
  n_subjects            number of subjects
  n_components          number of components
  method                decomposition method: 'dict_learning' or 'ica'

options:
  -h, --help            show this help message and exit
  --smoothing_fwhm SMOOTHING_FWHM
                        FWHM of Gaussian smoothing kernel
  --memory MEMORY       Directory to cache data
  --memory_level MEMORY_LEVEL
                        Level of memory caching
  --random_state RANDOM_STATE
                        Random state for reproducibility
  --standardize STANDARDIZE
                        Standardization method
  --n_jobs N_JOBS       Number of jobs to run in parallel

For Dictionary Learning

python viewer.py 10 20 dict_learning --smoothing_fwhm 6.0 --memory nilearn_cache --memory_level 2 --random_state 0 --standardize zscore_sample --n_jobs -1

For ICA

python viewer.py 10 20 ica --smoothing_fwhm 6.0 --memory nilearn_cache --memory_level 2 --random_state 0 --standardize zscore_sample --n_jobs -1

Prerequisites

To set up the environment for running the script, you have two options: creating a conda environment or installing the required libraries using pip.

Step 1

Install FMRIB Software Library (FSL)

Step 2

Option 1: Conda Environment

Install Miniconda or Anaconda

Create a conda environment

conda env create -f environment.yml

Option 2: Pip Installation

Install Python

Install the required libraries using pip

pip install local_requirements.txt

Usage

Run the script using the following command:

python app.py <N_SUBJECTS> <N_COMPONENTS>

Replace <N_SUBJECTS> with the desired number of subjects and <N_COMPONENTS> with the desired number of components. For example, to process 5 subjects with 10 components each, use:

python app.py 5 10

Disclaimer

This script is provided as-is and without any warranty. Use it at your own risk. Ensure you have sufficient disk space and computational resources to perform the processing for the specified number of subjects and components.

neuro's People

Contributors

eriosta 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.