pair_align_functions_bayes {fdasrvf} | R Documentation |
Align two functions
Description
This function aligns two functions using Bayesian SRSF framework. It will align f2 to f1
Usage
pair_align_functions_bayes(
f1,
f2,
timet,
iter = 15000,
times = 5,
tau = ceiling(times * 0.4),
powera = 1,
showplot = TRUE,
extrainfo = FALSE
)
Arguments
f1 |
function 1 |
f2 |
function 2 |
timet |
sample points of functions |
iter |
number of iterations (default = 15000) |
times |
factor of length of subsample points to look at (default = 5) |
tau |
standard deviation of Normal prior for increment (default ceil(times*.4)) |
powera |
Dirichlet prior parameter (default 1) |
showplot |
shows plots of functions (default = T) |
extrainfo |
T/F whether additional information is returned |
Value
Returns a list containing
f1 |
function 1 |
f2_q |
registered function using quotient space |
gam_q |
warping function quotient space |
f2_a |
registered function using ambient space |
q2_a |
warping function ambient space |
match_collect |
posterior samples from warping function (returned if extrainfo=TRUE) |
dist_collect |
posterior samples from the distances (returned if extrainfo=TRUE) |
kappa_collect |
posterior samples from kappa (returned if extrainfo=TRUE) |
log_collect |
log-likelihood of each sample (returned if extrainfo=TRUE) |
pct_accept |
vector of acceptance ratios for the warping function (returned if extrainfo=TRUE) |
References
Cheng, W., Dryden, I. L., and Huang, X. (2016). Bayesian registration of functions and curves. Bayesian Analysis, 11(2), 447-475.
Examples
out <- pair_align_functions_bayes(
f1 = simu_data$f[, 1],
f2 = simu_data$f[, 2],
timet = simu_data$time
)