Binica

From SCCN
Jump to: navigation, search

Download BINICA binaries: a Compiled C Version of runica()

This binary version of the runica() function of Makeig et al. contained in the EEG/ICA Toolbox runs ~12x faster than the Matlab version and may be ~4x more compact. It uses the logistic infomax ICA algorithm of Bell and Sejnowski, with natural gradient and extended ICA extensions. It was programmed for unsupervised operation by Scott Makeig at CNL, Salk Institute, La Jolla CA. Sigurd Enghoff translated it into C++ code and compiled it for multiple platforms. J-R Duann has improved the PCA dimension-reduction and has compiled the linux and free_bsd versions.
Use: To use the function, call with a ".sc" file argument. For individual applications, copy and modify the sample script "ica.sc".m. Under UNIX or DOS command line

 % ica < myversion.sc

Be sure that the directory that you store the binary file in is in your search path. e.g., In Unix/Linux add this directory to your root .cshrc file "setenv path" line.


Outputs: Ica creates two files, "xxx.wts" and "xxx.sph" containing weights and sphere matrices such that (under Matlab)

>> ICA_activations = wts * sph * data;

The "xxx" stem in the output files may be specified within the input .sc parameter file. See the sample .sc file for arguments, and the EEG/ICA toolbox tutorial for more details.

To use one of these programs from within Matlab (and EEGLAB)

  1. download the file and place them in the eeglab directory (you may create a subfolder for them or uncompress them in the function subfolder).
  2. edit the icadefs.m file to specify the file name of the executable you intend to use (variable ICABINARY).
  3. add the path to the binary function both to your Matlab path and to your Unix path, otherwize the system will not be able to locate the executable file.
  4. From the command line, you may use the binica.m function that will call the binary executable. From the EEGLAB graphical interface, run ICA using the 'binica' option of the Tools > Run ICA graphic interface (see the tutorial for how to compute ICA components).

Older version of the ICA binary are available below (these versions are not compatible with the Matlab binica.m function and cannot be used directly in Matlab or from EEGLAB (although see bug 1604); The ica.sc text configuration file (sample here)in the archive must be edited manually). SGI Unix (older version) Sun Unix (older version) Windows PC (95, 98, NT, 2000, XP?. older version)

Download SOURCE code

The binica.zip (13Mb) contains the source code, and binica_full.zip (~180Mb) source code plus many binaries. This code is distributed under the GNU GPL license and may not be used for commercial applications. It is copyrighted by the Salk Institute for biological studies and the University of San Diego California. This code can usually compile under most Unix machines. The binary above for Mac OSX also contains a make file for Mac OSX. Some recommendation below:

  1. if you uncompress using winzip, deactivate the "tar smart CR/LF" option in winzip in the menu Option > configuation tab Miscellaneous
  2. recompile BLAS (folder CLABPACK\BLAS)
  3. recompile LABPACK (CLABPACK folder)
    For 2 and 3 it is actually better if you find on the Internet the latest versions of these libraries
  4. make the ICA binary file by using the makefile in the main directory
  5. Modify the icadefs.m Matlab file under EEGLAB so that it points to your binary (in case you want to call it from Matlab).
  6. For credits, please quote "binary Infomax ICA by Sigurd Enghoff, based on the Matlab version of Scott Makeig and collaborators. Makeig S, Anthony J. Bell, Tzyy-Ping Jung and Terrence J. Sejnowski, Independent component analysis of electroencephalographic data In: D. Touretzky, M. Mozer and M. Hasselmo (Eds). Advances in Neural Information Processing Systems 8:145-151 (1996)."

The README file embedded in the compressed archive also contains additional details. We would advise to use the GNU C compiler since the Makefiles should be compatible with it. Please when you have succeeded compiling it, send us a copy of the exe file (and a small report of how you did it) so we can put the new file on the Internet.

Important: Infomax ICA is under a patent by the Salk Institute and any commercial product using this type of algorithm (or the recompiled binary files distributed here) should contact the Salk Institute patent office.

Code provided for convenience: This code is not supported and this page is provided for convenience only. If you want to add more documentation (readme file etc...) and guidelines for users or want to set up a project under sourceforge to support development and maintenance of BINICA, please feel free to do so. We will not answer questions regarding the compilation of this code. - Arnaud Delorme, November 21, 2007.