6.10.4. scikits.learn.fastica.fastica¶
- scikits.learn.fastica.fastica(X, n_components=None, algorithm='parallel', whiten=True, fun='logcosh', fun_prime='', fun_args={}, max_iter=200, tol=0.0001, w_init=None)¶
Perform Fast Independent Component Analysis.
Parameters : X : (n, p) array of shape = [n_samples, n_features]
Training vector, where n_samples is the number of samples and n_features is the number of features.
n_components : int, optional
Number of components to extract. If None no dimension reduction is performed.
algorithm : {‘parallel’,’deflation’}
Apply an parallel or deflational FASTICA algorithm.
whiten: boolean, optional :
If true perform an initial whitening of the data. Do not set to false unless the data is already white, as you will get incorrect results. If whiten is true, the data is assumed to have already been preprocessed: it should be centered, normed and white.
fun : String or Function
The functional form of the G function used in the approximation to neg-entropy. Could be either ‘logcosh’, ‘exp’, or ‘cube’. You can also provide your own function but in this case, its derivative should be provided via argument fun_prime
fun_prime : Empty string (‘’) or Function
See fun.
fun_args : Optional dictionnary
If empty and if fun=’logcosh’, fun_args will take value {‘alpha’ : 1.0}
max_iter : int
Maximum number of iterations to perform
tol : float
A positive scalar giving the tolerance at which the un-mixing matrix is considered to have converged
w_init : (n_components,n_components) array
Initial un-mixing array of dimension (n.comp,n.comp). If None (default) then an array of normal r.v.’s is used
source_only: if True, only the sources matrix is returned :
Notes
The data matrix X is considered to be a linear combination of non-Gaussian (independent) components i.e. X = AS where columns of S contain the independent components and A is a linear mixing matrix. In short ICA attempts to `un-mix’ the data by estimating an un-mixing matrix W where S = W K X.
Implemented using FastICA:
A. Hyvarinen and E. Oja, Independent Component Analysis: Algorithms and Applications, Neural Networks, 13(4-5), 2000, pp. 411-430