align_fPCA {fdasrvf}R Documentation

Group-wise function alignment and PCA Extractions

Description

This function aligns a collection of functions while extracting principal components.

Usage

align_fPCA(
  f,
  time,
  num_comp = 3,
  showplot = T,
  smooth_data = FALSE,
  sparam = 25,
  parallel = FALSE,
  cores = 8,
  MaxItr = 51
)

Arguments

f

matrix (N x M) of M functions with N samples

time

vector of size N describing the sample points

num_comp

number of principal components to extract (default = 3)

showplot

shows plots of functions (default = T)

smooth_data

smooth data using box filter (default = F)

sparam

number of times to apply box filter (default = 25)

parallel

enable parallel mode using foreach and doParallel package

cores

set number of cores to use with doParallel (default = 2)

MaxItr

maximum number of iterations

Value

Returns a list containing

f0

original functions

fn

aligned functions - matrix (N x M) of M functions with N samples

qn

aligned srvfs - similar structure to fn

q0

original srvfs - similar structure to fn

mqn

srvf mean - vector of length N

gam

warping functions - vector of length N

Dx

cost function

vfpca

list containing

q_pca

srvf principal directions

f_pca

f principal directions

latent

latent values

coef

coefficients

U

eigenvectors

References

Tucker, J. D., Wu, W., Srivastava, A., Generative Models for Function Data using Phase and Amplitude Separation, Computational Statistics and Data Analysis (2012), 10.1016/j.csda.2012.12.001.

Examples

## Not run: 
data("simu_data")
out = align_fPCA(simu_data$f,simu_data$time)

## End(Not run)

[Package fdasrvf version 1.9.7 Index]