Coder Social home page Coder Social logo

parallel_life's Introduction

Parallel_LiFE

About

This set of routines and associated dataset provide an example of the optimization problem solved in the Linear Fascicle Evaluation (LiFE) method as implemented in the Encode Toolbox (https://github.com/brain-life/encode.git).

In this example, only 50 iterations of the BBNNLS algorithm are performed. In a real application we use 500 or more iterations.

The most computationally intensive tasks are the computations of matrix by vector products, which are performed through the folloging functions (implemented as mex files):

  • Mtransp_times_b(), i.e. w = M'*b

  • M_times_w(), i.e y = M*w

We believe these two operations can be made in parallel by building the appropriate blocks of data within the matrix and the vector.

The above functions make use of the tensor decomposition format of the very large matrix M (details of the decomposition are provided in the paper here https://arxiv.org/pdf/1505.07170.pdf.

For clarity, we have included a Matlab version of these two functions inside the folder \mexfiles\ with the names 'Mtransp_times_b' and 'M_times_w'. Please take a look into these very short codes. Note that both functions are reduced to simple forloops.

Purpose of the repository:

To allow code developers to reduce the computation time of this task by using a parallel implementation.

Dependencies.

Instructions to run this code

1. Download/clone this repository (https://github.com/ccaiafa/Parallel_LiFE.git)

  • Add the Paralell_LiFE folder to your matlab search path. To do so in the MatLab prompt type:
   >> addpath(genpath('/my/path/to/the/Paralell_LiFE/folder/'))
  • Download the demo datasets from the repository doi:10.5967/K8X63JTX.

  • UNTAR the main file Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes.tar.gz

  • Go inside the folder Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/ and UNZIP the following files: Figs_data.zip, HCP3T.zip, HCP7T, and STN. You can deleted the original .zip files once they are unziped.

  • The structures of files and foldes under the main folder should looks like as follows

  • feDemoDataPath.m

  • Figs_data/

  • HCP3T/

  • HCP7T/

  • README.txt

  • STN/

  • Add the main data folder (Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/) to your matlab search path. To do so in the MatLab prompt type:

   >> addpath(genpath('/my/path/to/the/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/'))

3 Generate mex files for your system

Run the script /Generate_mex_files.m). This script generate the mex files using the C code provided in the folder /mexfiles/

4. Run the Main.m script

This script extract the data from one brain and run the optimization using only 50 iterations. The number of iterations can be changed through the variable opt.maxit.

parallel_life's People

Contributors

ccaiafa avatar

Watchers

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