noisecloud v1.0

This package has been developed from original scripts, so please submit bug reports to our user group.





  • You must have spm installed and added to your path.




Independent Component Analysis

Preprocessing your data and performing ICA are up to you, to be done with your software package of choice. I would recommend the MELODIC toolbox in FSL. For resting BOLD you will likely want to include bandpass filtering of your data, and registering all subjects to a standard template.


To extract spatial features relevant to different regions of interest and matter types, you will need to register the templates provided in the “mr” folder to the standard template that you data is registered to. You should add paths to these images under the script noisecloud_setup.

Component Input

If you performed ICA with FSL, you can select the .ica directories as your input, and the script will find the thresholded Z-stat images as well as the corresponding timeseries text files (t*.txt). If you have not used FSL, you must select these files manually. An example image and timeseries file are provided under example.

Feature Extraction



  • The main function that you want to run is “noisecloud.” You can use it as follows:

to return a list of normalized features, corresponding labels (columns), and component IDs (rows). You will be asked to select FSL .ica directories, atlas images (that must be coregistered to the same standard template as your data), as well as specify the TR. The subject IDs will be extracted from the folder name. Change the script prep/noisecloud_read_fsldirs.m to edit specifics of the paths, etc, or just write your own input function.





Create Labels

You will need to have a set of labels to distinguish noise/not-noise, or some network of interest/~network of interest. If you processed your data with FSL, you can use the label networks gui under “prep/label-good-bad-gui” to create a .mat file with both image labels and names. If not, use prep/noisecloud_create_labels as a guide to create this .mat file.

Build Classifier

You can use any sort of machine learning that you like to predict label type from the normalized data. As an example, this pipeline provides noisecloud_classify, which will use cross validated logistic regression with the elastic net, a regularization technique that varies between the LASSO penalty and standard ridge regression. It is supremely awesome. To build the classifier with your data, run:

  • The script will ask you to select your labels.mat file (created with the label networks gui),
  • a value of K for cross validation,
  • and a number of permutations (if you are interested in comparing your best cross validation accuracy to a distribution produced via random shuffling of the labels). It is recommended to start with 1 permutation, as more than one takes a longer time.
  • Alpha is chosen via a grid search between 0 and 1, and lambda is selected from a range based on the value that maximizes the cross validated accuracy.
  • The script will plot an ROC curve to show sensitivity and specificity of your classifier, and a confusion matrix. In the case that you run permutations, these ROC curves will be plotted as well. The RESULT output object contains details about the model, the model itself, as well as selected features and weights.

Just Download Features


The script noisecloud_download has been provided to just download feature extraction scripts into the temp folder. For each spatial feature script (noisecloud_spatial_*.m, the scripts take as input the 3D spatial map. For each temporal feature script (noisecloud_temporal_*.m) the scripts take as input the timeseries as a single vector. Note that the download is incredibly simple – we query the database via HTTP (sometimes called a REST API), which returns JSON that is parsed by Matlab.



Please submit your spatial and temporal features for others to use! Use the following format:



Noisecloud User Group