[Eeglablist] Re: runica() and runpca()
Arnaud Delorme
arno at salk.edu
Thu Jul 17 12:14:46 PDT 2003
>
>
>1) could you tell me what's the difference between using the 'pca' option
>in runica() and using runpca()...?
>they give different results on the same dataset.
>
The PCA option in runica() is used to reduce the dimentionality of the
data before running ICA. If you have EEG.data containing 64 electrodes, then
runica(EEG.data);
and
runica(EEG.data, 'pca', 64);
will give return theoritically indentical results (this is not totally
true in practice though), because the PCA preprocessing will only rotate
the data.
However, if your dataset contains the activity of reference
electrode(s), the activity at these electrode(s) can be a linear mixture
of the activity at other electrodes. As a result, the rank of your data
matrix is lower than your number of electrodes. For EEG.data containing
65 electrodes (64+1 reference; rank of the matrix 64), if you run
runica(EEG.data)
the decomposition will not converge (wchange will not converge to 0) and
the algorithm will terminate after 512 iterations (by default) with
non-relevant components.
On the other hand, if you try
runica(EEG.data, 'pca', 64)
Then, ICA will be run on the first 64 PCA components (rank of the matrix
is 64) and ICA should be able to converge.
The function runpca() simply applies PCA to the data not ICA. You may
use it to obtain the eigenvalue of the pre-processing PCA decomposition
in "runica(EEG.data, 'pca', 64)", since the runica() function does not
return these PCA eigenvalues
Best
Arno
the matrix might not converge. ICA can not find
>2) the results from runica(data,'pca',numfact) make more sense for these
>data in particular: is there a
>way in which I can calculate the eigenvalues of the factors extracted
>using this method?
>
>thanks
>chris
>
>
>
>
>
>Christopher Summerfield
>summerfd at psych.columbia.edu
>
>On Thu, 26 Jun 2003, Arnaud Delorme wrote:
>
>
>
>>To obtain the eigenvalue from the decomposition, you should use the
>>runpca() function or the matlab svd() function. For instance, from an
>>EEGLAB dataset
>>
>>[pc,eigvec,sv] = runpca(EEG.data(:,:));
>>
>>% Outputs:
>>% pc - the principal components, i.e. >> inv(eigvec)*data = pc;
>>% eigvec - the inverse weight matrix (=eigenvectors). >> data = eigvec*pc;
>>% sv - the singular values (=eigenvalues)
>>
>>You may obtain the percentage variance accounted for by using the
>>compvar() function (enter PCA components instead of ICA components),
>>i.e. to get the percentage accounted for by the first PCA component
>>
>>[proj pvaf] = compvar(EEG.data(:,:), pc, eigvec, 1);
>>% pvaf = percentage of variance accounted for
>>
>>Arno
>>
>>Christopher Summerfield wrote:
>>
>>
>>
>>>hi there
>>>
>>>when using the 'pca' option in runica(), is it possible to determine the
>>>eigenvalues/ %variance accounted for by each factor extracted?
>>>
>>>thanks
>>>chris summerfield
>>>
>>>
>>>
>>>
>>>
>>>Christopher Summerfield
>>>summerfd at psych.columbia.edu
>>>_______________________________________________
>>>Eeglablist mailing list Eeglablist at sccn.ucsd.edu
>>>Eeglablist page: http://www.sccn.ucsd.edu/eeglab/eeglabmail.html
>>>To unsubscribe, send an empty email to eeglablist-unsub at sccn.ucsd.edu
>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>
>>*Arnaud Delorme, Ph.D.*
>>Computational Neurobiology Lab, Salk Institute
>>10010 North Torrey Pines Road
>>La Jolla, CA 92037 USA
>>
>>*Tel* : /(+1)-858-458-1927 ext 15/
>>*Fax* : /(+1)-858-458-1847/
>>*Web page *: www.sccn.ucsd.edu/~arno <http://www.sccn.ucsd.edu/%7Earno>
>>
>>
>>
>>
>>
>
>
>
>
--
*Arnaud Delorme, Ph.D.*
Computational Neurobiology Lab, Salk Institute
10010 North Torrey Pines Road
La Jolla, CA 92037 USA
*Tel* : /(+1)-858-458-1927 ext 15/
*Fax* : /(+1)-858-458-1847/
*Web page *: www.sccn.ucsd.edu/~arno <http://www.sccn.ucsd.edu/%7Earno>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20030717/f1cd15a7/attachment.htm
More information about the Eeglablist
mailing list