ica#

diffsptk.ICA#

alias of IndependentComponentAnalysis

class diffsptk.IndependentComponentAnalysis(order, n_comp, *, func='logcosh', n_iter=100, eps=0.0001, batch_size=None, seed=None, verbose=False)[source]#

Independent component analysis module. Note that the forward method is not differentiable.

Parameters:
orderint >= 0

The order of the vector, \(M\).

n_compint >= 1

The number of components, \(K\).

func[‘logcosh’, ‘gauss’]

The nonquadratic function used in the approximation of negentropy.

n_iterint >= 1

The number of iterations.

epsfloat >= 0

The convergence threshold.

batch_sizeint >= 1 or None

The batch size.

seedint or None

The random seed.

verbosebool

If True, shows progress bars.

References

[1]

A. Hyvarinen and E. Oja, “Independent component analysis: algorithms and applications,” Neural Networks, vol. 13, pp. 411-430, 2000.

forward(x)[source]#

Perform independent component analysis.

Parameters:
xTensor [shape=(T, M+1)] or DataLoader

The input vectors or a DataLoader that yields the input vectors.

Returns:
WTensor [shape=(K, K)]

The separating matrix.

transform(x)[source]#

Separate the input vectors into independent components.

Parameters:
xTensor [shape=(…, M+1)]

The input vectors.

Returns:
outTensor [shape=(…, K)]

The estimated independent components.

See also

pca