dexFastICA: Run the fastICA algorithm without matrix preprocessing

Description Usage Arguments Details Value See Also Examples

Description

Runs the fastICA algorithm but does not perform any matrix preprocessing operations first (this differs from the fastICA function in the fastICA package.) Preprocessing steps should be carried out by running other functions, e.g. preprocessMatrix, on the input matrix prior to using this function.

Usage

1
2
dexfastICA(X, n.comp, alg.typ = c("parallel", "deflation"), fun = c("logcosh", "exp"),
alpha = 1, maxit = 200, tol = 1e-04, verbose = FALSE, w.init = NULL, max.attempts = 3)

Arguments

X

a numeric matrix(-like object)

n.comp

an integer specifying the number of components to extract

alg.typ, fun, alpha, maxit, tol, verbose

See fastICA documentation

w.init

integer value to reset random number generator with (see Details)

max.attempts

maximum number of attempts at convergence to make

Details

This function runs the fastICA algorithm on the input matrix but it does so without running any preprocessing operations (such as centering and scaling on the rows and/or columns) on the input matrix first. This allows alternative preprocessing methods (such as scaleMatrix) to be applied to the input matrix, which can improve results. The preprocessMatrix function may be run on the input matrix to carryout typical preprocessing steps, such as column centering.

Note: The default parameter values in preprocessMatrix match those of fastICA, thus, running preprocessMatrix followed by dex.fastICA with default parameter values is equivalent to running fastICA.

If w.init is not NULL, its value will be used to reset the random number generator (using set.seed) prior to randomly generarting the initial W ('unmixing') matrix. This differs from fastICA, as w.init there can be either NULL or a matrix. This modification to w.init was made in order to make reproducing results easier.

Another difference between this algorithm and fastICA is that multiple attempts at convergence can be made if convergence fails in the first attempt. The maximum number of attempts that will be made is specified by the max.attempts parameter. The maximum number of iterations in each attempt, specified by maxit, is increased by 1.5x in each subsequent attempt. If convergence fails, the ICA solution found at the last iteration of the last attempt will be returned as an approximate solution.

Value

A list with the following elements:

S

The estimated source matrix

A

The estimated mixing matrix

attempts

The number of attempts made at finding a solution

iterations

The number of iterations made during the last attempt

converged

A logical value indicating whether convergence was reached

See Also

fastICA, preprocessMatrix, predictModules

Examples

1
2
3
4
x = matrix(rnorm(100), 10, 10)
x = preprocessMatrix(x)
m = dexFastICA(x, n.comp = 3)
m$converged

MPCary/DEXICA documentation built on May 4, 2019, 2:35 p.m.