Print

Print


That’s not the right way to think about it.  You could run melodic spatial ICA to detect the dimensionality (e.g. 150) and then make the following decomposition:

Y (20000 X 1870) = S (20000 X 150) * T (150 X 1870) + E (20000 X 1870)

Then run temporal ICA on T to generate less than or equal to 150 temporal ICA components.

PCA dimensionality reduction could work in theory, but it would be to generate timeseries, not spatial maps.  Using sICA gives you the opportunity to remove artifacts, apply the same decomposition across subjects, etc.  

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Ali Golestani <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Monday, February 5, 2018 at 3:51 PM
To: <[log in to unmask]>
Subject: Re: [FSL] Temporal ICA with MELODIC

Thanks Matt for the prompt response. I have two further questions:
1- Considering my original data dimension is around 20000 voxels x 1870 time points, do you recommend to first run spatial ICA and create a (let's say) 20000 voxels x 150 components, and then run a temporal ICA to create a 50 x 150 output?
2- I have read papers on temporal and spatial ICA, but I still can't understand why a PCA dimension reduction won't work? For example if I run PCA and reduce the dimension to 150X1870 and then run ICA to generate a set of 50x1870 components.
Cheers
Ali


On Mon, Feb 5, 2018 at 3:57 PM, Matt Glasser <[log in to unmask]> wrote:
I would let FastICA handle a lot of that internally.  Here is a fastICA command line that I have used for temporal ICA in the preprint I referenced below:

TCS=sICAdim X time; sICAdim=137; tICAdim=84;

[normicasig, A, W] = fastica(TCS,'approach','symm','g','tanh','lastEig',sICAdim,'numOfIC’,tICAdim,'displayMode','off','maxNumIterations',1000);

Also, when I run temporal ICA it is on timecourses from a spatial ICA decomposition or the first stage of dual regression, not on raw dense timecourses.  This is how temporal ICA for fMRI data was originally described in Smith et al 2012 PNAS.

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Ali Golestani <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Monday, February 5, 2018 at 2:09 PM

To: <[log in to unmask]>
Subject: Re: [FSL] Temporal ICA with MELODIC

Thanks Matt;

I prepared a test case for FastICA in Matlab. It would be great if you check it and see if I am doing anything wrong.
the 2D data matrix is available in the following link:
https://drive.google.com/file/d/1Z5xlIjvTUHrI_lPgEJuL5jVyTSCsJMdk/view?usp=sharing

I ran the attached Matlab code to run FastICA on the 2D matrix. Based on PCA, it seems that the data dimension is around 150 (to keep 95 percent of variance in the data). But even when I choose 50 components, I got random spikes in components, both in temporal and spatial ICA cases.


On Fri, Feb 2, 2018 at 5:51 PM, Matt Glasser <[log in to unmask]> wrote:
I think it would be more fruitful to debug your matlab code than run temporal ICA with melodic, as that isn’t an officially supported mode.  Having done a significant amount of spatial and temporal ICA with the FastICA matlab code, I’m happy to help you with this either here or on the HCP Users mailing list.

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Ali Golestani <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Friday, February 2, 2018 at 6:38 AM

To: <[log in to unmask]>
Subject: Re: [FSL] Temporal ICA with MELODIC

Because even when I run spatial ICA with matlab, I get get spiky components, but with Melodic the components look good. I think I am doing something wrong with matlab and want to check if I can use melodic instead
Regards
Ali

On Fri, Feb 2, 2018 at 3:40 AM Andreas Bartsch <[log in to unmask]> wrote:
Hi Ali,

Matt pointed out to me that melodic has a hidden --temporal option so that
you may avoid reshaping.
However, it is not entirely clear why you don©öt stick to matlab's FastICA.
Cheers,
Andreas


Von:  FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Ali
Golestani <[log in to unmask]>
Antworten an:  FSL - FMRIB's Software Library <[log in to unmask]>
Datum:  Donnerstag, 1. Februar 2018 um 22:39
An:  <[log in to unmask]>
Betreff:  Re: [FSL] Temporal ICA with MELODIC


Thanks Andreas;

Does it mean reshaping my 4D data from let's say 64x64x15x2000 to
2000x64x15x64? In this case, won't MELODIC think I only have 64 samples?
whereas actually I want to have 64x64x15 samples.


Cheers

Ali



On Tue, Jan 30, 2018 at 4:32 AM, Andreas Bartsch <[log in to unmask]>
wrote:

Hi,

you could - if you want to use melodic - rearrange your data, i.e. by
changing the temporal with your biggest spatial dimension, run melodic and
then rearrange the outputs.
Cheers,
Andreas

Von:  FSL - FMRIB's Software Library <[log in to unmask]> on behalf of
Matt Glasser <[log in to unmask]>
Antworten an:  FSL - FMRIB's Software Library <[log in to unmask]>
Datum:  Montag, 29. Januar 2018 um 23:38
An:  <[log in to unmask]>
Betreff:  Re: [FSL] Temporal ICA with MELODIC


How do you know the correct dimensionality of a single subject, single run
of temporal ICA?  From experience it is much lower than spatial ICA.  It
is possible to run temporal ICA with melodic, but it will not magically
work better than matlab FastICA.  Also the melodic default is to reduce
the dimensionality with PCA to the same dimensionality as the ICA.  I
recommend reading a few papers on temporal ICA:

http://www.pnas.org/content/109/8/3131.short
https://www.biorxiv.org/content/early/2017/12/13/193862

Peace,

Matt.

From:  FSL - FMRIB's Software Library <[log in to unmask]> on behalf of
Ali Golestani <[log in to unmask]>
Reply-To:  FSL - FMRIB's Software Library <[log in to unmask]>
Date:  Monday, January 29, 2018 at 4:04 PM
To:  <[log in to unmask]>
Subject:  Re: [FSL] Temporal ICA with MELODIC


Using MATLAB FastICA, the only way I can get components with no spike is
to reduce dimension with PCA to 20 or 30 and then run temporal ICA. But 10
or 20 dimension is too low. Running ICA with no PCA does not give
meaningful result, even if I choose 10 components.

I was wondering if somehow I can run temporal ICA with MELODIC?



On Mon, Jan 29, 2018 at 4:51 PM, Matt Glasser <[log in to unmask]> wrote:

What about 10 components?  Does that give reasonable results?  What is the
spatial covariance of the component maps?  Are some almost perfectly
correlated?

Peace,

Matt.

From:  FSL - FMRIB's Software Library <[log in to unmask]> on behalf of
Ali Golestani <[log in to unmask]>
Reply-To:  FSL - FMRIB's Software Library <[log in to unmask]>
Date:  Monday, January 29, 2018 at 3:45 PM
To:  <[log in to unmask]>
Subject:  Re: [FSL] Temporal ICA with MELODIC




Around 30 to 50 components.



Cheers

Ali



On Mon, Jan 29, 2018 at 4:43 PM, Matt Glasser <[log in to unmask]> wrote:

How many components are you requesting?

Peace,

Matt.

From:  FSL - FMRIB's Software Library <[log in to unmask]> on behalf of
Ali Golestani <[log in to unmask]>
Reply-To:  FSL - FMRIB's Software Library <[log in to unmask]>
Date:  Monday, January 29, 2018 at 3:41 PM
To:  <[log in to unmask]>
Subject:  Re: [FSL] Temporal ICA with MELODIC


a multi-band resting-state fMRI with around 1900 voxels and 2000 samples
per voxel (TR around 400 ms).


On Mon, Jan 29, 2018 at 4:35 PM, Matt Glasser <[log in to unmask]> wrote:

What kind of data are you trying to run temporal ICA on?

Peace,

Matt.

From:  FSL - FMRIB's Software Library <[log in to unmask]> on behalf of
Ali Golestani <[log in to unmask]>
Reply-To:  FSL - FMRIB's Software Library <[log in to unmask]>
Date:  Monday, January 29, 2018 at 9:36 AM
To:  <[log in to unmask]>
Subject:  [FSL] Temporal ICA with MELODIC


Hi;
I want to run a single-subject temporal ICA and wondering how I can run
temporal ICA with MELODIC?
 I tried FastICA in MATLAB but, for both spatial and temporal ICA, all I
got is lots of spikes and bumps
(https://www.cs.helsinki.fi/u/ahyvarin/papers/ICA99_bumps.pdf).
 Dimension reduction with PCA alleviates the problem but does not fix
it. The same dataset gives beautiful results with MELODIC spatial ICA

Thanks


Ali