<div dir="ltr">Dear Yair, <br><div><br></div><div>I too have closely followed the thread on ICA run times and have also experimented myself with various settings. Following the discussion thread helped me a great deal in understanding ICA.<br><br></div><div>here are a few points which have been suggested to be most important for of ICA times:<br><br></div><div>1. 1 Hz highpass filter: This is one of the most important setting, as ICA needs the data to be stationary.<br></div><div>2. Bad epochs and channels: High amplitude bursts seem to slow down ICA, so it is important that these are rejected before running ICA<br></div><div>3. Full Rank data: The data should be full rank or 'pca' should be limited to a number equal to or lower than the rank of the data<br></div><div>4.; Low pass filtering: Filtering the hiher frrequencies which are not of interest also drastically improved ICA run times in my datasets. I think this reduces ICA's effort to explain the extra variance in the high frequencies.<br></div><div>4. Data size: The data size can be large depending on the sampling rate, long testing duration, or number of channels, or any combinations of the three.  Downsampling the data helps a great deal. I don't think that there is anything we can do about the duration of the signals. But if the length of the data is very short and the number of channels are high this seems to be a problem, and the dimensionality of the data has to be reduced using pca  -  Makoto says this<span style="color:rgb(255,0,0)"><font size="2"> Rule of thumb formula: channels^2 x k, k = 20~30 for</font></span><span style="color:rgb(255,0,0)"><font size="2"> 30 channels when sampling rate is 250 Hz. The constant</font></span><span style="color:rgb(255,0,0)"><font size="2"> k should increase exponentially as the number of </font></span><span style="color:rgb(255,0,0)"><font size="2">channels increases.  (see slide number 13 in <a href="https://sccn.ucsd.edu/mediawiki/images/7/74/IcaDecompositionOfEegData4.pdf">https://sccn.ucsd.edu/mediawiki/images/7/74/IcaDecompositionOfEegData4.pdf</a>. )<br><br></font></span></div><div></div><div><br>We've used ICA in our lab successfully in the past but recently came upon a problem - some of our subjects's ICA take much longer than others. while some take between 30-40 minutes, these may last up to 50+ hours.<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>I couldn't find a similar pattern in these subjects - some of them begin with fixing rank computation inconsistency (64 to X), some start by lowering learning rate and some begin training steps straight away. </div></div></div></blockquote><div><font color="#0000ff">I suppose you might be using channel interpolation in your pre-processing steps. I think you should hold off with channel interpolation before running ICA. And try to have the same pre-processing steps in all the subjects.</font><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Measuring was done using 64 electrodes + 5 external. Pre-process included highpass over 0.01, and epochs were divided to [-1.2  1.8] sec windows. Data was saved in double precision (.set + .fdt files)</div></div></div></blockquote><div><font color="#0000ff">Were these five external channels recorded with the same reference as those of the 64 channels? If not, then they should be excluded from ICA. Or they have to be somehow converted such that they have the same reference as the other 64<br><br></font></div><div><font color="#0000ff">Your high pass filter appears too low for ICA. You should observe significantly improved ICA run times with a high pass of 1Hz.<br><br></font></div><div><font color="#0000ff">Your epochs seem to be fine. You just need enough number of epochs matching Makoto's Rule of thumb fo data size<br></font></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>I tried running on different computers, different versions of MATLAB, and different methods (runica & binica) but still no change in speed. </div><div>One other thing, after pre-processing i noticed that when checking for th rank (using rank(EEG.data(:,:)) the value is between 1-31, should it be 64? Reducing PCA to 63 ('pca',63) dimensions also didn't help.</div></div></div></blockquote><div><font color="#0000ff">Rank of 1 seems a little to extreme, I don't know how it can become that low. the rank must be equal to the number of channels, unless you have done channel interpolation or any kind of re-referencing. the 'pca' cannot be any greater than the rank of the data. That is why 'pca' of 33 is not improving the run times.</font><br></div><div> </div></div>Before, when I didn't follow these steps, my 25 minute long 64 channel data used to take around 1 hour to run ICA. <br>Whereas now after following all these steps (I just ran an ICA ) it just takes around 200-250 SECONDS to run ICA simultaneously on five such datasets using a parallel for loop (parfor - Arno suggested to use a parallel 'for' loop to decrease ICA run times when you have multiple datasets, and it really helps).<br><br><br></div><div class="gmail_extra">I hope this helps. Do report back, about which steps worked and which didn't. <br><br></div><div class="gmail_extra">Best Wishes, <br></div><div class="gmail_extra">Nike <br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font color="#6633ff" face="georgia,serif"><a href="http://goog_636235333" target="_blank">G Nike Gnanateja</a></font></div><div><font color="#6633ff" face="georgia,serif">Ph.D Candidate,</font></div><div><font color="#6633ff" face="georgia,serif">Department of Audiology, </font></div><div><font color="#6633ff" face="georgia,serif">All India Institute of Speech</font></div><div><font color="#6633ff" face="georgia,serif">and Hearing Mysore-06</font></div></div></div></div></div></div></div>
</div></div></div>