time_warping {fdasrvf}R Documentation

Alignment of univariate functional data

Description

This function aligns a collection of 1-dimensional curves that are observed on the same grid.

Usage

time_warping(
  f,
  time,
  lambda = 0,
  penalty_method = c("roughness", "geodesic", "norm"),
  centroid_type = c("mean", "median"),
  center_warpings = TRUE,
  smooth_data = FALSE,
  sparam = 25L,
  parallel = FALSE,
  optim_method = c("DP", "DPo", "DP2", "RBFGS"),
  max_iter = 20L
)

Arguments

f

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

time

A numeric vector of length M specifying the common grid on which all curves f have been observed.

lambda

A numeric value specifying the elasticity. Defaults to 0.0.

penalty_method

A string specifying the penalty term used in the formulation of the cost function to minimize for alignment. Choices are "roughness" which uses the norm of the second derivative, "geodesic" which uses the geodesic distance to the identity and "norm" which uses the Euclidean distance to the identity. Defaults to "roughness".

centroid_type

A string specifying the type of centroid to align to. Choices are "mean" or "median". Defaults to "mean".

center_warpings

A boolean specifying whether to center the estimated warping functions. Defaults to TRUE.

smooth_data

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

sparam

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

parallel

A boolean specifying whether to run calculations in parallel. Defaults to FALSE.

optim_method

A string specifying the algorithm used for optimization. Choices are "DP", "DPo", and "RBFGS". Defaults to "DP".

max_iter

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

Value

An object of class fdawarp which is a list with the following components:

References

Srivastava, A., Wu, W., Kurtek, S., Klassen, E., Marron, J. S., May 2011. Registration of functional data using Fisher-Rao metric, arXiv:1103.3817v2.

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 <- time_warping(simu_data$f, simu_data$time)

## End(Not run)

[Package fdasrvf version 2.2.0 Index]