| fastica | R Documentation |
The fast fixed point algorithm for independent component analysis and projection pursuit based on the direct translation to R of the FastICA program of the original authors at the Helsinki University of Technology.
fastica(
X,
components = NCOL(X),
demean = TRUE,
method = "symmetric",
pca_cov = "ML",
first_eigen = NULL,
last_eigen = NULL,
E = NULL,
D = NULL,
Z = NULL,
K = NULL,
L = NULL,
A_init = NULL,
fun = "tanh",
tune = "none",
tanh_par = 1,
gauss_par = 1,
step_size = 1,
stabilization = FALSE,
tol = 1e-04,
maxiter = 1000,
maxiter_fine = 100,
sampling_ratio = 1,
seed = NULL,
trace = FALSE,
...
)
X |
the data matrix (n x m) where n is the number of samples and m is the number of signals. |
components |
the number of independent components to extract. |
demean |
whether to demean the data. |
method |
the method to use, with “symmetric” estimating all the independent component in parallel, whereas “deflation” estimates independent components one-by-one similar to projection pursuit. |
pca_cov |
the method used to calculate the covariance matrix for PCA. Options are “ML” (maximum likelihood), “LW” (Ledoit-Wolf) shrinkage method and “EWMA” (exponentially weighted moving average). |
first_eigen |
This and |
last_eigen |
the index of the last (smallest) eigenvalue to be retained
and overwrites |
E |
(optional) Eigen vector from the PCA decomposition. If this
is provided then |
D |
(optional) Eigen values from the PCA decomposition. |
Z |
(optional) provided whitened signal matrix. If this is provided then
both |
K |
(optional) whitening matrix. |
L |
(optional) de-whitening matrix. |
A_init |
optional initialization for the mixing matrix. |
fun |
the non-linear function to use in the fixed-point algorithm. |
tune |
the non-linear function to use for fine tuning. |
tanh_par |
control parameter for the “tanh” function. |
gauss_par |
control parameter for the “gauss” function. |
step_size |
if this is anything other than 1, the program will use the stabilized version of the algorithm (see stabilization argument). |
stabilization |
whether to use the stabilized version of the algorithm, in which case the step_size can momentarily be halved if the algorithm is stuck between two points (called a stroke). Additionally if there no convergence before half of the maximum number of iterations has been reached then step_size will be halved for the rest of the rounds. |
tol |
the stopping tolerance. |
maxiter |
the maximum number of iterations. |
maxiter_fine |
the maximum number of iterations for the fine tuning algorithm in the deflation method. |
sampling_ratio |
percent (0-1) of random samples used in one iteration |
seed |
the random seed for the random number generator. |
trace |
whether to print out progress information. |
... |
additional arguments to be passed to the covariance matrix calculation.
For arguments passed to the “EWMA” method, it optionally takes an additional argument
|
Steps to the general algorithm are as follows:
Demean the data if required: M = X - \mu
Calculate the covariance matrix \Sigma using one of the
methods provided.
Use an eigen decomposition to calculate the eigenvalues and eigenvectors
of the covariance matrix: \Sigma = E D E'
Select the range of eigenvalues to retain (dimensionality reduction).
Calculate the whitening matrix K = D^{-1/2}E' and the dewhitening
matrix L = E D^{1/2}.
Whiten the data: Z = M K'. Unwhitening is done by M = Z L'.
Run the RADICAL algorithm to calculate the rotation matrix U,
the mixing matrix: A = U^{-1} L and the unmixing matrix W = K' U.
Calculate the independent components: S = M W + \bold{1}\mu W where
1 is a matrix of ones with dimension (samples x 1).
Notice that in calculating the mixing (A) and unmixing (W) matrices we have combined
the whitening (K) and un-whitening (L) matrices with the rotation matrix U.
A list with the following components:
A |
the mixing matrix |
W |
the unmixing matrix |
S |
the independent components |
U |
the rotation matrix |
K |
the whitening matrix |
L |
the dewhitening matrix |
C |
the covariance matrix |
Z |
the whitened signal |
mu |
the mean of the mixed signal (X) |
elapsed |
the time taken to run the algorithm |
Hyvarinen1999tsmarch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.