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 = 3L,
  showplot = TRUE,
  smooth_data = FALSE,
  sparam = 25L,
  parallel = FALSE,
  cores = NULL,
  max_iter = 51L,
  lambda = 0
)

Arguments

f

A numeric matrix of shape M \times N specifying a sample of N 1-dimensional curves observed on a grid of size M.

time

A numeric vector of length M specifying the grid on which functions f have been evaluated.

num_comp

An integer value specifying the number of principal components to extract. Defaults to 3L.

showplot

A boolean specifying whether to display plots along the way. Defaults to TRUE.

smooth_data

A boolean specifying whether to smooth data using box filter. Defaults to FALSE.

sparam

An integer value specifying the number of times to apply box filter. Defaults to 25L. This argument is only used if smooth_data == TRUE.

parallel

A boolean specifying whether computations should run in parallel. Defaults to FALSE.

cores

An integer value specifying the number of cores to use for parallel computations. Defaults to NULL in which case it uses all available cores but one. This argument is only used when parallel == TRUE.

max_iter

An integer value specifying the maximum number of iterations. Defaults to 51L.

lambda

A numeric value specifying the elasticity. Defaults to 0.0.

Value

A list with the following components:

References

Tucker, J. D., Wu, W., Srivastava, A., Generative models for functional data using phase and amplitude separation, Computational Statistics and Data Analysis (2012), 10.1016/j.csda.2012.12.001.

Examples

## Not run: 
  out <- align_fPCA(simu_data$f, simu_data$time)

## End(Not run)

[Package fdasrvf version 2.2.0 Index]