Modifications Copyright (C) Jaakko Väyrynen.

FastICA is licenced under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of the
License, or any later version.

These files are modified FastICA (v2.5) for Matlab functions that can
be faster and use less memory for *large* and *sparse* matrices.
FastICA can be used normally, so the modifed functions work with full
matrices as well, but haven't been very well tested. If you are
interested, use diff to see changes to the original files.
               
Usage
 * download FastICA v2.5
   * http://www.cis.hut.fi/projects/ica/fastica/code/FastICA_2.5.tar.gz
 * download modified files
   * http://research.ics.tkk.fi/cog/data/FastICA_2.5-large-sparse.tar.gz
 * extract the packages
 * use the Matlab command ADDPATH
   * Add first FastICA the directory, then the directory with the modified files
                                               
Summary of modifications                                                        
 * mean of the data is removed after dimension reduction and whitening          
 * covariance matrix is computed in batch mode                                  
          
Changed files                                                                   
 * fastica.m                                                                    
   * mean of the original data matrix is removed                                
     after dimension reduction and whitening                                    
     (doesn't destroy the sparsity of the original high-dimensional data)       
 * pcamat.m                                                                     
   * computes covariance matrix using itercov function                          
     (this is faster and uses less memory for large matrices)                   
   * unrelated modification: E0 and D0 can be given as parameters               
     (used for manually computing different number of ICs)                      
 * whitenv.m                                                                    
   * data mean is passed as a separate parameter                                
     (the whitened mean is removed from the lower-dimensional data)             

Added files                                                                     
 * itercov.m                                                                    
   * computes "cov(X',1)" in batches, which is                                  
     faster and uses less memory for large matrices                             
   * some benchmarking                                                          
     X=sprand(1000,10000,0.1);                                                  
     tic; C=itercov(X); toc        => 0.72 seconds                              
     tic; C=cov(X',1); toc         => 27 seconds                                
     X=sprand(2000,100000,0.01);                                                
     tic; C=itercov(X); toc        => 19 seconds                                
     tic; C=cov(X',1); toc         => 1179 seconds                              
                                                                                
Other things                                                                    
 * Computing log(X+1) for a sparse matrix (X>=0)                                
   * logX = spfun(inline('log(1+x)'),X)                                         
     (computes value for non-zero elements, less intermediary matrices)         
 * See also bsxfun for full large matrices                                      
   * Mean removal: bsxfun(@minus, A, mean(A))                                   
   * Normalization: bsxfun(@rdivide, A, max(abs(A),[],2));                      
