formula: an object of class "formula" of the form data_curves ~ ...".
data_curves: list of data.frames with observed points in each row. Each variable is one coordinate direction. If there is a variable t, it is treated as the time parametrization, not as an additional coordinate.
x_data: a data.frame with covariates.
knots: set of knots for the parameter curves of the regression model
type: if "smooth" linear srv-splines are used which results in a differentiable mean curve if "polygon" the mean will be piecewise linear.
closed: TRUE if the curves should be treated as closed.
max_iter: maximal number of iterations
eps: the algorithm stops if L2 norm of coefficients changes less
pre_align: TRUE if curves should be pre aligned to the mean
Returns
an object of class elastic_reg_model, which is a list
with entries - type: "smooth" if linear srv-splines or "polygon" if constant srv-splines were used
coefs: spline coeffiecients
knots: spline knots
data_curves: list of data.frames with observed points in each row. First variable t gives the initial parametrization, second variable t_optim
the optimal parametrization when the curve is aligned to the model prediction.
closed: TRUE if the regression model fitted closed curves.