8.5.6. sklearn.decomposition.FastICA¶
- class sklearn.decomposition.FastICA(n_components=None, algorithm='parallel', whiten=True, fun='logcosh', fun_prime='', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None)¶
FastICA; a fast algorithm for Independent Component Analysis
Parameters : n_components : int, optional
Number of components to use. If none is passed, all are used.
algorithm : {‘parallel’, ‘deflation’}
Apply parallel or deflational algorithm for FastICA
whiten : boolean, optional
If whiten is false, the data is already considered to be whitened, and no whitening is performed.
fun : {‘logcosh’, ‘exp’, or ‘cube’}, or a callable
The non-linear function used in the FastICA loop to approximate negentropy. If a function is passed, it derivative should be passed as the ‘fun_prime’ argument.
fun_prime : None or a callable
The derivative of the non-linearity used.
max_iter : int, optional
Maximum number of iterations during fit
tol : float, optional
Tolerance on update at each iteration
w_init : None of an (n_components, n_components) ndarray
The mixing matrix to be used to initialize the algorithm.
random_state: int or RandomState :
Pseudo number generator state used for random sampling.
Notes
Implementation based on A. Hyvarinen and E. Oja, Independent Component Analysis: Algorithms and Applications, Neural Networks, 13(4-5), 2000, pp. 411-430
Attributes
unmixing_matrix_ 2D array, [n_components, n_samples] The unmixing matrix Methods
fit(X) get_mixing_matrix() Compute the mixing matrix get_params([deep]) Get parameters for the estimator set_params(**params) Set the parameters of the estimator. transform(X) Apply un-mixing matrix “W” to X to recover the sources - __init__(n_components=None, algorithm='parallel', whiten=True, fun='logcosh', fun_prime='', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None)¶
- get_mixing_matrix()¶
Compute the mixing matrix
- get_params(deep=True)¶
Get parameters for the estimator
Parameters : deep: boolean, optional :
If True, will return the parameters for this estimator and contained subobjects that are estimators.
- set_params(**params)¶
Set the parameters of the estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The former have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.
Returns : self :
- transform(X)¶
Apply un-mixing matrix “W” to X to recover the sources
S = X * W.T