Fits an elastic full Procrustes mean for open, planar curves.
Is usually called from compute_elastic_shape_mean.
Usage
fit_mean(
srv_data_curves,
knots,
penalty,
var_type,
pfit_method,
max_iter,
type,
eps,
cluster,
verbose,
smooth_warp
)Arguments
- srv_data_curves
list of
data.frames with srv vectors in each row.curves- knots
set of knots for the mean spline curve
- penalty
the penalty to use in the covariance smoothing step. use '-1' for no penalty.
- var_type
(experimental) assume "smooth", "constant" or "zero" measurement-error variance along t
- pfit_method
(experimental) "smooth" or "polygon"
- max_iter
maximal number of iterations
- type
if "smooth" linear srv-splines are used which results in a differentiable mean curve if "polygon" the mean will be piecewise linear.
- eps
the algorithm stops if L2 norm of coefficients changes less
- cluster
a cluster object for use in the
bamcall- verbose
print iterations
- smooth_warp
(experimental) controls the weighting of original and smoothed observations over the iterations, if pfit_method == "smooth".
Value
a list with entries
- type
"smooth" or "polygon"
- coefs
coefssrv spline coefficients of the estimated mean- knots
spline knots
- penalty
penalty used in the covariance estimation
- distances
distances to mean
- fit
a
listcontainingt_optimsoptimal parametrizationsG_optimsoptimal rotationsb_optimsoptimal scalingsn_optimsoptimal re-normalizationn_iternumber of iterations until convergencegramthe mean basis Gram matrix,cov_fitthe covariance smoothing objects in the final iteration,cov_pcacov coef matrix pca object in the final iteration andpfit_coefsthe mean basis coefs of smoothed pfits in the final iteration