This function aligns two functions using SRSF framework. It will align f2 to f1
pair_align_functions(
f1,
f2,
time,
lambda = 0,
pen = "roughness",
method = "DP",
w = 0.01,
iter = 2000
)Returns a list containing
aligned f2
warping function
function 1
function 2
sample points of functions
controls amount of warping (default = 0)
alignment penalty (default="roughness") options are
second derivative ("roughness"), \(L^2\) distance of the warping function
from id ("l2gam"), \(L^2\) distance of the SRVF of the warping function
from that of id ("l2psi"), geodesic distance from id ("geodesic"), and no
penalty ("none"). "norm" is kept for backward compatibility as an alias for
"l2gam". The penalty is weighted by lambda, so it has no effect when
lambda = 0.
controls which optimization method (default="DP") options are Dynamic Programming ("DP"), the original Dynamic Programming implementation ("DPo"), Riemannian BFGS ("RBFGS"), Simultaneous Alignment ("SIMUL"), Dirichlet Bayesian ("dBayes"), and Expo-Map Bayesian ("expBayes")
controls LRBFGS (default = 0.01)
number of mcmc iterations for mcmc method (default 2000)
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 Function Data using Phase and Amplitude Separation, Computational Statistics and Data Analysis (2012), 10.1016/j.csda.2012.12.001.
Cheng, W., Dryden, I. L., and Huang, X. (2016). Bayesian registration of functions and curves. Bayesian Analysis, 11(2), 447-475.
Lu, Y., Herbei, R., and Kurtek, S. (2017). Bayesian registration of functions with a Gaussian process prior. Journal of Computational and Graphical Statistics, DOI: 10.1080/10618600.2017.1336444.
out <- pair_align_functions(
f1 = simu_data$f[, 1],
f2 = simu_data$f[, 2],
time = simu_data$time
)
Run the code above in your browser using DataLab