In this vignette we consider approximating multiple data matrices as a product of multiple low-rank matrices (a.k.a., factor matrices).
Test data is available from toyModel
.
library("iTensor") data1 <- iTensor::toyModel("MICA") data2 <- iTensor::toyModel("GroupICA") str(data1, 2) str(data2, 2)
Both data1
and data2
contain two time-series data X
and Y
as follows.
plot.ts(data1$X[7700:8000,], main="data1 (X)") plot.ts(data1$Y[7700:8000,], main="data1 (Y)")
plot.ts(data2$X[4700:5000,], main="data2 (X)") plot.ts(data2$Y[4700:5000,], main="data2 (Y)")
As a formulation that extends ICA (independent component analysis) to the multiple matrices case, Multimodal Independent Component Analysis (MICA) was proposed ([@mica]). MICA extracts statistically dependent pairs of features from the sources, where the components of feature vector extracted from each source are independent.
MICA
can be performed as follows.
t_series <- seq(from = 0.00, to = 1.000, by = 1e-4) out.MICA <- MICA(data1$X, data1$Y, J=3, gamma_ts = 1 - 1 / (1 + exp(-100 * (t_series - 0.3))))
J
is the rank parameter for ICA and gamma_ts
is the weighting factor for dependence on independence.
You will see that MICA
could extract some time-series signals.
plot.ts(out.MICA$U[7700:8000, ], main="Source Signal (X)") plot.ts(out.MICA$V[7700:8000, ], main="Source Signal (Y)")
Another formulation of the decomposition is Group Independent Component Analysis (GroupICA [@groupica1; @groupica2]). GroupICA
can be performed as follows.
out_groupica <- GroupICA(data2, J1=6, algorithm="pooled")
The rank for each factor matrix can be set as J1
and the decomposition algorithm can be easily switched by ica.algorithm
(algorithm
of ICA
and ICA2
can be specified). To pool the results of ICA against each data matrix, we implemented three algorithms such as pooled
, Calhoun2009
, and Pfister2018
. For the details, see the references [@groupica1; @groupica2].
You will see that GroupICA
could extract some time-series signals.
plot.ts(out_groupica$Ss[[1]], main="Source Signal (X)") plot.ts(out_groupica$Ss[[2]], main="Source Signal (Y)")
Unlike MICA
, GroupICA
can also be applied to more than three matrices.
sessionInfo()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.