This function transforms curves from their original functional space to the SRVF space.
f_to_srvf(f, time, multidimensional = FALSE)
A numeric array of the same shape as the input array f
storing the
SRSFs of the original curves.
Either a numeric vector of a numeric matrix or a numeric array specifying the functions 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\).
A numeric vector of length \(M\) specifying the grid on which the curves are evaluated.
A boolean specifying if the curves are
multi-dimensional. This is useful when f
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
.
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.
q <- f_to_srvf(simu_data$f, simu_data$time)
Run the code above in your browser using DataLab