Python module for extended Infomax ICA
Independent Componnent Analysis (ICA) is a modern and effective method for performing blind Source separation (also known as Cocktail Party Problem). Fields of application are artifact reduction in multivariate data (eg EEG or MEG), finding hidden factors in financial data or noise reduction in images. Further ICA can be used to simplify and improve the solution of the inverse source problem in EEG and MEG analysis. As I found no Python module for performing ICA, I wrapped the existing extended infomax implementation from EEGLAB.
If you want to learn more about ICA I recommend this paper and this online tutorial.
Click py_ica.zip for downloading the Windows version. A linux version can you find here. For downloading the modules look at this post.
As it uses some modern features of numpy, you should check before if import numpy.ctypeslib works.
After installing with “python setup.py install” try the examples. The examples need matplotlib. If you get an error message “item 1 in _argtypes_ is not a valid C type” your version of ctypes is to old.
If you are interested in the sources or if you need the module for another platform feel free to contact me. We plan a JNI based module for using infomax from Java.
Here you can see an example of mixing and unmixing three sources:





Nice! But why does it only work for Windows? Any chance of a Linux version? Is there anything I can do to achieve this?
By the way, there is a module that does ICA in Python. See:
http://mdp-toolkit.sourceforge.net/
But it does FastICA, not Infomax. Would be nice to get Infomax included in MDP.
Cheers, Gabriel
Comment by Gabriel Beckers — December 15, 2007 @ 16:57
Well, I will work on it as soon as possible. Maybe we can provide a linux version before january.
Comment by uschmitt — December 16, 2007 @ 17:01
OK, many thanks in advance. If there is anything I can do, let me know.
Comment by Gabriel Beckers — December 16, 2007 @ 20:30
I just fixed a memory leak in the linux-version. Use the usual link above. The updated windows module will follow soon.
Comment by uschmitt — December 26, 2007 @ 16:17
Thanks, works fine now on my system!
Comment by Gabriel — January 3, 2008 @ 18:30
The linux version had dos style line terminators. I fixed it.
Comment by uschmitt — March 7, 2008 @ 10:45
any chance you could compile a 64-bit version of wrap_ica.so? we’re getting ELFCLASS32 errors on our shiny new server. thanks!
Comment by scott — June 26, 2008 @ 16:21
[...] further information about this module please look at the first announcement of the [...]
Pingback by procoders.net » Update of ICA packages — July 17, 2008 @ 16:05
[...] to some problems when deploying my py_ica module to several platforms I changed the way the C-code is called from [...]
Pingback by procoders.net » Python calling C code: py_ica moves from ctypes to f2py — August 5, 2008 @ 14:06
Since this is the top hit for “python infomax”… it’s probably good to mention somewhere here that one may want to look at http://www.procoders.net/?p=129 instead
Comment by njs — March 20, 2009 @ 10:29
Thanks njs, I changed it.
Comment by uschmitt — March 20, 2009 @ 11:11
I can’t download the py_ica_linux.zip file, the page does not egzist when I click the link: “A linux version can you find here“. What is wrong? Can You send me this package to my e-mail, or repair this site (or maybe there is another way to get it ? this linux version). Please, help me.
Michał
Comment by persching — November 3, 2009 @ 23:02
You should look at the updated post at http://www.procoders.net/?p=129
Comment by uschmitt — November 4, 2009 @ 11:11
can ICA be implemnted in MATLAB? if yes then.plz give me the code of that…
Comment by sweety — November 30, 2009 @ 9:33
Yes, one can implement ICA in Matlab. But I can not give you the code of that.
Try http://lmgtfy.com/?q=ica+matlab !
Comment by uschmitt — November 30, 2009 @ 11:17