Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
faq:why_does_my_ica_output_contain_complex_numbers [2010/01/19 18:48]
saskia
faq:why_does_my_ica_output_contain_complex_numbers [2017/08/17 11:21] (current)
Line 5: Line 5:
 Independent component analysis (ICA) can not return more components than the [[http://​en.wikipedia.org/​wiki/​Rank_(linear_algebra)|rank]] of your data. For example, if your data contains 100 linearly independent channels, then the rank of your data would be 100, and you can compute up to 100 independent components. If your data contains 100 channels, of which 99 channels are independent but channel 100 is dependent on channel 99 (e.g. chan100 = -chan99), then the max number of independent components to fully describe your data would be 99. If you try to compute 100 components on this data set, it will fail. Componentanalysis will either return an error, or get into a loop and eventually give you output that contains complex numbers. Independent component analysis (ICA) can not return more components than the [[http://​en.wikipedia.org/​wiki/​Rank_(linear_algebra)|rank]] of your data. For example, if your data contains 100 linearly independent channels, then the rank of your data would be 100, and you can compute up to 100 independent components. If your data contains 100 channels, of which 99 channels are independent but channel 100 is dependent on channel 99 (e.g. chan100 = -chan99), then the max number of independent components to fully describe your data would be 99. If you try to compute 100 components on this data set, it will fail. Componentanalysis will either return an error, or get into a loop and eventually give you output that contains complex numbers.
  
-This might occur when you include ​reference ​channels ​in your data. +This might occur when you have EEG data which is re-referenced using the common average reference, with EEG data that has the reference ​channel included ​in the data structure, or with (Neuromag) MEG data that has been MaxFiltered.  
-It can be solved by excluding ​the reference ​channels from the component analysisi.e:+The following shows how to exclude ​the reference ​channelbefore calling ft_componentanalysis:
  
 <​code>​ <​code>​
Line 22: Line 22:
 </​code>​ </​code>​
  
-This returns 99 components, and after back projection gives you again your 100 channels, which can be useful for plotting/​interpretation purposes.+This returns 99 components, and after back projection gives you again your 100 channels, which can be useful for plotting/​interpretation purposes. The last snippet of code can in general be applied. So, when having Neuromag MaxFiltered data with a rank of 60, the cfg.runica.pca argument should be set to 60 (or less).
  
 Note that for independent component analysis (with ft_componentanalysis),​ the EEGlab toolbox is required. Note that for independent component analysis (with ft_componentanalysis),​ the EEGlab toolbox is required.