Aligns curve f2 to curve f1 using elastic alignment with
a configurable roughness penalty on the warping function.
Usage
elastic.pair.penalized(
f1,
f2,
argvals = NULL,
penalty = c("first_order", "second_order", "combined"),
lambda = 1
)Arguments
- f1
Numeric vector (reference curve).
- f2
Numeric vector (curve to align).
- argvals
Numeric vector of evaluation points. If
NULL, defaults toseq(0, 1, length.out = length(f1)).- penalty
Character: penalty type. One of
"first_order","second_order", or"combined".- lambda
Numeric penalty weight (default 1.0).
Value
A list with components:
- gamma
Warping function
- f.aligned
Aligned version of f2
- distance
Elastic distance after alignment