FCA.FCAModule

Module providing the free componant analysis (FCA) algorithm.

FCA.ent_sumMethod
ent_sum(Z)

Calculate the negative um of negentropy of rows of Z

FCA.err_pdMethod
err_pd(Ie)

Calculate the error (up to permuataion and rescaling) between Ie and identity matrix:

\[err = \mathrm{min}_{P, D} ||PDI_{e} - I||_{F},\]

where $P$ runs over all permuataion matrices and $D$ runs over all diagonal non-singular matrices. $||~||_F$ denotes the Frobeneous norm.

Arguments

  • Ie: the input matrix, supposed to be close to identity matrix.

Outputs

  • err: the error between Ie and identity matrix defined as above.
FCA.free_entMethod
free_ent(X; mat = "her")

This function return the free entropy of a matrix X

Arguments

  • X: a matrix, Hermitian or rectangular
  • mat: the type of X, valid options are "her" and "rec"

Outputs

  • chi: a scalr, it is the free entropy of X
FCA.free_whitenMethod
free_whiten(Z; mat = "her")

This function whitens input array of matrices in the free probability sense

Arguments

  • Z: an array of matrices of mat and of the same dimensions
  • mat: the type of Z[i], valid options are "her" and "rec"

Outputs

  • Y: an array of centered matrices, whitened in the free probability sense, that is, Tr(Y[i]*Y[j]')/size(Y[1],1) = (i == j)
  • U: a matrix of size s-by-s, where s = size(Z, 1)
  • Σ: a matrix of size s-by-s,
FCA.freecfMethod
freecf(Z; mat="her", obj="kurt", opt="orth")

Apply free component analysis to Z, return estimated mixing matrix and free components

Arguments

  • Z: an array of matrices of mat and of the same dimensions
  • mat: the type of Z[i], valid options are "her" and "rec"
  • obj: the type of loss function, valid options are "kurt" and "ent"
  • opt: string, type of optimization, valid option: "orth", "sphe"

Outputs

  • Aest: a matrix of size s-by-s, where s = size(Z, 1)
  • Xest: an array of "free" matrices, such that Z = Aest*Xest
FCA.grad_ent_sumMethod

gradentsum(W, Z)

This function calcualtes the gradient of ent_sum(W'*Z) w.r.t W

Arguments

  • W: a matrix such that size(W, 1) = size(Z, 1)
  • Z: an array of vectors of the same length, regarded as the realizations of mixed independent signals

Outputs

  • grad: the gradient of ent_sum(W'*Z) w.r.t W
FCA.grad_neg_abs_sum_free_kurtMethod
grad_neg_abs_sum_free_kurt(W, Y)

This function calcualtes the gradient of negabssumfreekurt(W'*Y) w.r.t W

Arguments

  • W: a matrix such that size(W, 1) = size(Y, 1)
  • Y: an array of matrix of same type and same dimension

Outputs

  • grad: the gradient of negabssumfreekurt(W'*Y) w.r.t W
FCA.grad_neg_abs_sum_kurtMethod

gradnegabssumkurt(W, Z)

This function calcualtes the gradient of negabssum_kurt(W'*Z) w.r.t W

Arguments

  • W: a matrix such that size(W, 1) = size(Z, 1)
  • Z: an array of vectors of the same length, regarded as the realizations of mixed independent signals

Outputs

  • grad: the gradient of negabssum_kurt(W'*Z) w.r.t W
FCA.grad_sum_free_entMethod
grad_sum_free_ent(W, Z; mat = "her")

This function calcualtes the gradient of sumfreeent(W'*Y) w.r.t W

Arguments

  • W: a matrix such that size(W, 1) = size(Y, 1)
  • Y: an array of matrix of same type and same dimension

Outputs

  • grad: the gradient of sumfreeent(W'*Y) w.r.t W
FCA.icfMethod
icf(Z; opt = "orth")

Apply independent component analysis to Z, return estimated mixing matrix and independent components

Arguments

  • Z: an array of vectors of the same length, represent the realizations of mixed independent signals
  • obj: the type of loss function, valid options are "kurt" and "ent"
  • opt: string, type of optimization, valid option: "orth", "sphe". The "sphe" is only designed for "kurt" loss function

Outputs

  • Aest: estimated mixing matrix of size s-by-s, where s = size(Z,1)
  • Xest: estimated independent component Xest = pinv(Aest)*Z
FCA.kurtMethod
kurt(z)

This function returns the kurtosis of z

Arguments

  • z: an vector regarded as independent realizations of a random variables

Outputs

  • k: a scalar, kurtosis of z
FCA.mat_centerMethod
mat_center(X; mat = "her")

This function centers input. If X is a Hermitian matrix, then $Xcen = X - Tr(X)/N*I$. If X is a rectangular matrix, thenXcen = X - X*ones(M,1)*ones(1,M)/M`.

Arguments

  • X: a Hermitian or rectangular matrix
  • mat: the type of X, valid options are "her" and "rec"

Outputs:

  • Xc: centered version of X
FCA.mat_embedMethod
mat_embed(X, dim; zero_pos = -1, tpin = "her", tpout = "her")

This function embeds X into new dimensions dim, with the Cartesian order of the entries are preserved. Fill in zeros at zero_pos if necessary.

Arguments

  • X: a Hermitian or rectangular matrice
  • dim: target dimension, array-like [Nnew,Mnew]
  • zero_pos: an array of user specify Cartesian position for zeros. if it is -1, then use randomly generated position.
  • tpin: the type of input matrix, valid options are "her" and "rec".
  • tpout: the type of ouput matrix, valid options are "her" and "rec"

Outputs

  • Xnew: a matrix of dimension dim and the type tpin. The entries Xnew are from X, with possible extra zeros at zero_pos,
FCA.neg_abs_sum_free_kurtMethod
neg_abs_sum_free_kurt(Z)

This function calculates the sum of negative absolute value of free kurtosis of components of Z

FCA.neg_abs_sum_kurtMethod
neg_abs_sum_kurt(Z)

Calculate the sum of negative absolute value of kurtosis of rows of Z

FCA.negentMethod

negent(z)

This function returns the negentropy of z

Arguments

  • z: an vector regarded as independent realizations of a random variables

Outputs

  • k: a scalar, negentropy of z
FCA.sum_free_entMethod
sum_free_ent(Z; mat = "her")

This function calculates the sum of free entropy of components of Z

FCA.κ₄Method
κ₄(X)

This function return the free kurtosis of a matrix X

Arguments

  • X: a matrix, Hermitian or rectangular

Outputs

  • fk: a scalar, the free kurtosis of X
FCA.OptOrthoMethod
OptOrtho(loss, grad, s)

This function returns the opimizer of loss, whose feasible set is O(s), using the GradientDescent method from Manifold optimization package Optim

Arguments

  • loss: loss function whose input is a orthogonal matrix
  • grad: Euclidean gradient function of loss function w.r.t to the orthogonal matrix
  • s: The feasible set is O(s)
  • opt_config: configuration passed to Optim

Outputs:

  • Xopt: orthogonal matrix optmize loss function
FCA.OptSphereMethod
OptOrtho(loss, grad, s)

This function returns the opimizer of loss, whose feasible set is S(s - 1), using the GradientDescent method from Manifold optimization package Optim

Arguments

  • loss: loss function whose input is a orthogonal matrix
  • grad: Euclidean gradient function of loss function w.r.t to the orthogonal matrix
  • s: The feasible set is S(s-1)
  • opt_config: configuration passed to Optim

Outputs:

  • Xopt: orthogonal matrix optmize loss function