Transfer the alignment learned from a source sample of curves to a target sample. The Karcher mean and warping structure estimated from the source are used to guide the alignment of the target curves, which is useful when the target sample is small or noisy.
Value
A list with components:
- aligned
fdata of the aligned target curves
- gammas
fdata of warping functions applied to the target
- source.mean
fdata of the source Karcher mean
- distances
numeric vector of elastic distances
Examples
# \donttest{
set.seed(1)
t <- seq(0, 1, length.out = 50)
X1 <- matrix(0, 20, 50)
for (i in 1:20) X1[i, ] <- sin(2 * pi * t + runif(1, -0.3, 0.3))
X2 <- matrix(0, 5, 50)
for (i in 1:5) X2[i, ] <- sin(2 * pi * t + runif(1, -0.5, 0.5))
source <- fdata(X1, argvals = t)
target <- fdata(X2, argvals = t)
res <- transfer.alignment(source, target)
# }