Learn R Programming

pfica (version 0.1.0)

ffobi: Smoothed functional ICA in terms of basis functions coordinates

Description

This function computes the ordinary ICA procedure from a sample represented by basis functions (Fourier, B-splines...). The estimation method is based on the use of fourth moments (FOBI), in which it is assumed that the independent components have different kurtosis values. The proposed algorithm can be considered an extension of the implementation of the kurtosis operator introduced in Pe<U+00F1>a et. al (2014), whose decomposition is used to identify cluster structures and outliers.

Usage

ffobi(fdx, ncomp = fdx$basis$nbasis, eigenfPar = fdPar(fdx),
      center = FALSE, plotfd = FALSE)

Arguments

fdx

a functional data object obtained from the fda package.

ncomp

number of independent components to compute.

eigenfPar

a functional parameter object, obtained from the fda package, that defines the independent component functions to be estimated.

center

a logical value indicating whether the mean function has to be subtracted from each functional observation.

plotfd

a logical value indicating whether to plot the eigenfunctions of the FOBI operator.

Value

a list with the following named entries:

eigenbasis

a functional data object for the eigenfunctions or independent factors.

kurtosis

a numeric vector giving the kurtosis associated to each independent component vector.

scores

a matrix whose column vectors are the independent components.

Details

This IC model for functional data consists in performing the multivariate ICA of a transformation of the coordinate vectors associated to a basis of functions. This algorithm also incorporates a continuous penalty in the orthonormality constraint.

Let \(x=(x_{i}(t)\colon i=1,\ldots,n;t\in T)\) be a set of functions in a finite-dimensional space spanned by a basis of functions \(\{\phi_{1}(t),\ldots,\phi_{p}(t)\}\). Assume that each function of \(x\) and an independent factor \(h\) can be expanded as $$x_{i}(t)=\sum_{j=1}^{p}a_{ij}\phi_{j}(t),\quad h(t)=\sum_{j=1}^{p}c_{j}\phi_{j}(t)=\phi(t)^{\prime}c.$$ Consider also the matrix \(G=(\int_{T}\phi_{j}(t)\phi_{j'}(t)dt;j,j'=1,\ldots,p)\) and the continuous matrix of penalties \(G_{r}=\int_{T}\left(\mathcal{D}^{r}\phi_{j}(t)\right)\left(\mathcal{D}^{r}\phi_{j'}(t)\right)'dt,\) where \(\mathcal{D}\) denotes r-order difference operator. Then, the followed ICA procedure can be summarized in the following steps:

  1. Standardization of the coordinates: \(A_{st}=\mathrm{cov}(A)^{-\frac{1}{2}}\left(A-\mathrm{E}\left[A\right]\right),\) where \(A=(a_{ij})_{n\times p}\).

  2. Find solutions to the matrix generalized eigenproblem: $$n^{-1}K^{\bullet}c=\lambda(G+\rho G_{r})c$$ with \(K^{\bullet}\) a fixed FOBI matrix of \(A_{st}G\) and \(\rho\) a smoothing parameter.

  3. Obtain the matrix of coordinates \(C_{p\times p},\) whose columns are the eigenvectors of the FOBI matrix \(K^{\bullet},\) such that \(A_{st}C\) are the independent components of \(x\).

Note that, by applying Cholesky factorization of the form \(LL'=G+\rho G_{r},\) the generalized eigenproblem in step 2 leads to an eigenproblem of a symmetric FOBI matrix of \(A_{st}GL^{-1'}\). Then, the basis coefficients of the independent factors are given by \(c_{j}=L^{-1^{\prime}} v_{j}\), where \(v_j\) are the eigenvectors of the above FOBI matrix.

References

Aguilera, AM. and MC. Aguilera-Morillo (2013). <U+201C>Penalized PCA approaches for B-spline expansions of smooth functional data<U+201D>. In: Applied Mathematics and Computation 219(14), pp. 7805<U+2013>7819.

Pe<U+00F1>a, C., J. Prieto, and C. Rend<U+00F3>n (2014). Independent components techniques based on kurtosis for functional data analysis. Working paper 14-10. Universidad Carlos III de Madrid.

Ramsay, J. and B. Silverman (2005). Functional Data Analysis. Springer.

Vidal, M. (2020). Functional Independent Component Analysis in Bioelectrical Signal Processing. MA thesis. Universidad de Granada.

See Also

kffobi

Examples

Run this code
# NOT RUN {
## Canadian Weather data
library(fda)
arg <- 1:365
Temp <- CanadianWeather$dailyAv[,,1]
B <- create.bspline.basis(rangeval=c(min(arg),max(arg)), nbasis=16)
x <- Data2fd(Temp, argvals = arg, B)
Lfdobj <- int2Lfd(max(0, norder(B)-2))
penf <- fdPar(B, Lfdobj, lambda=10^4)
ica.fd <- ffobi(x, 16, penf)
## Plot by region: classification in order of maximum kurtosis
k1 <- which.max(ica.fd$kurtosis)
k2 <- which.max(ica.fd$kurtosis[c(-k1)])+1
sc <- ica.fd$scores
plot(sc[,c(k1)], sc[,c(k2)], ylab = "", xlab = "")
text(sc[,c(k1)], sc[,c(k2)], CanadianWeather$region, pch=0.5, cex=0.6)
# }

Run the code above in your browser using DataLab