[Eeglablist] ICA at Script Level

Modestino, Edward J *HS EJM9F at hscmail.mcc.virginia.edu
Tue Oct 12 10:59:06 PDT 2010


Dear EEGLAB experts,

If you have a background in EEGLAB scripting and can help me with this, I would greatly appreciate this.



I have been referring to this, but not able to solve the problem: http://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts



Recently, I have had great trouble running ICA on my data using the GUI due to memory constraints.  We have not been able to fix this otherwise.  So, I have moved to the script level using a low memory script level version of ICA.  I load my dataset into the GUI and then run the script through the GUI.  Here is the script I have been using.



[EEG.icaweights EEG.sphere] = runicalowmem(reshape(EEG.data, EEG.nbchan, EEG.trials*EEG.pnts));

EEG = eeg_checkset(EEG);

[ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET);

eeglab redraw;



Here is the command window output:

"Input data size [62,1048575] = 62 channels, 1048575 frames

Finding 62 ICA components using logistic ICA.

Decomposing 272 frames per ICA weight ((3844)^2 = 1048575 weights, Initial learning rate will be 0.000157494, block size 70.

Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg.

More than 32 channels: default stopping weight change 1E-7

Training will end when wchange < 1e-007 or after 512 steps.

Online bias adjustment will be used.

Removing mean of each channel ...

Final training data range: -2048.65 to 1315.39

Computing the sphering matrix...

Starting weights are the identity matrix ...

Sphering the data ...

Beginning ICA training ...

Warning: Using 'state' to set RAND's internal state causes RAND, RANDI, and RANDN

to use legacy random number generators.

> In runicalowmem at 896

  In pop_runscript at 50

step 1 - lrate 0.000157, wchange 5985964.09709237, angledelta  0.0 deg

.

.

.

step 127 - lrate 0.000000, wchange 0.00000008, angledelta 50.9 deg

Sorting components in descending order of mean projected variance ..."





It appears from the command window that ICA ran on the data.  However, the current loaded dataset that ICA was run on says there are no ICA weights (GUI attached).  When I go to plot components, it says ICA needs to be run first.  So, clearly it ran but did not save the ICA to the dataset.



I thought that this following command would overwrite the variables in the workspace: [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET);



I thought this following command would update the display in the GUI: eeglab redraw;



However, this is not working.

Please help me if you can.
Thanks,
Ed Modestino

Edward Justin Modestino, Ph.D.
Postdoctoral Research Associate
Ray Westphal Neuroimaging Laboratory
Division of Perceptual Studies
Department of Psychiatry and Neurobehavioral Sciences
University of Virginia
Email: ejm9f at virginia.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20101012/af4eaf36/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GUI.jpg
Type: image/jpeg
Size: 57485 bytes
Desc: GUI.jpg
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20101012/af4eaf36/attachment.jpg>


More information about the eeglablist mailing list