srvf_to_f: Transformation from SRSF Space

View source: R/srvf_to_f.R

srvf_to_fR Documentation

Transformation from SRSF Space

Description

This function transforms SRVFs back to the original functional space.

Usage

srvf_to_f(q, time, f0 = 0, multidimensional = FALSE)

Arguments

q

Either a numeric vector of a numeric matrix or a numeric array specifying the SRSFs that need to be transformed.

  • If a vector, it must be of shape M and it is interpreted as a single 1-dimensional curve observed on a grid of size M.

  • If a matrix and multidimensional == FALSE, it must be of shape M \times N. In this case, it is interpreted as a sample of N curves observed on a grid of size M, unless M = 1 in which case it is interpreted as a single 1-dimensional curve observed on a grid of size M.

  • If a matrix and multidimensional == TRUE,it must be of shape L \times M and it is interpreted as a single L-dimensional curve observed on a grid of size M.

  • If a 3D array, it must be of shape L \times M \times N and it is interpreted as a sample of N L-dimensional curves observed on a grid of size M.

time

A numeric vector of length M specifying the grid on which SRSFs are evaluated.

f0

Either a numeric value or a numeric vector of or a numeric matrix specifying the initial value of the curves in the original functional space. It must be:

  • a value if q represents a single 1-dimensional SRSF.

  • a vector of length L if q represents a single L-dimensional SRSF.

  • a vector of length N if q represents a sample of N 1-dimensional SRSFs.

  • a matrix of shape L \times M if q represents a sample of N L-dimensional SRSFs.

multidimensional

A boolean specifying if the curves are multi-dimensional. This is useful when q is provided as a matrix to determine whether it is a single multi-dimensional curve or a collection of uni-dimensional curves. Defaults to FALSE.

Value

A numeric array of the same shape as the input q storing the transformation of the SRSFs q back to the original functional space.

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 amplitude and phase separation, Computational Statistics and Data Analysis (2012), 10.1016/j.csda.2012.12.001.

Examples

q <- f_to_srvf(simu_data$f, simu_data$time)
f <- srvf_to_f(q, simu_data$time, simu_data$f[1, ])

fdasrvf documentation built on Nov. 19, 2023, 1:09 a.m.