fcptpaBasis: Calculate a smooth PCA representation for functional data on...

Description Usage Arguments Details Value References See Also

View source: R/univDecomp.R

Description

This function calculates a smooth PCA representation based on the FCP_TPA algorithm (see References) for functional data on two-dimensional domains. In this case, the data can be interpreted as images with S1 x S2 pixels (assuming nObsPoints(funDataObject) = (S1, S2)), i.e. the total data for N observations can be represented as third order tensor of dimension N x S1 x S2.

Usage

1
2
3
4
5
6
7
8
fcptpaBasis(
  funDataObject,
  npc,
  smoothingDegree = rep(2, 2),
  alphaRange,
  orderValues = TRUE,
  normalize = FALSE
)

Arguments

funDataObject

An object of class funData containing the observed functional data samples (here: images) for which the smooth PCA is to be calculated.

npc

An integer, giving the number of principal components to be calculated.

smoothingDegree

A numeric vector of length 2, specifying the degree of the difference penalties inducing smoothness in both directions of the image. Defaults to 2 for each direction (2nd differences).

alphaRange

A list of length 2 with entries v and w containing the range of smoothness parameters to test for each direction.

orderValues

Logical. If TRUE, the eigenvalues are ordered decreasingly, together with their associated eigenimages and scores. Defaults to TRUE.

normalize

Logical. If TRUE the eigenfunctions are normalized to have norm 1. Defaults to FALSE.

Details

The smooth PCA of the tensor data is calculated via the FCP_TPA function. Smoothness is induced by difference penalty matrices for both directions of the images, weighted by smoothing parameters α_v, α_w. The resulting eigenvectors can be interpreted in terms of eigenfunctions and individual scores for each observation. See FCP_TPA for details.

Value

scores

A matrix of scores (coefficients) with dimension N x npc, reflecting the weights for principal component in each observation.

B

A matrix containing the scalar product of all pairs of basis functions.

ortho

Logical, indicating whether the eigenfunctions are orthonormal. Set to normalize, as this influences whether a normalization is done or not.

functions

A functional data object, representing the functional principal component basis functions.

values

A vector of length npc, containing the eigenvalues in decreasing order.

References

G. I. Allen, "Multi-way Functional Principal Components Analysis", In IEEE International Workshop on Computational Advances in Multi-Sensor Adaptive Processing, 2013.

See Also

univDecomp, FCP_TPA


MFPCA documentation built on Oct. 17, 2021, 5:06 p.m.