calc_shape_dist {fdasrvf} | R Documentation |
Elastic Shape Distance
Description
Calculates the elastic shape distance between two curves beta1
and beta2
.
Usage
calc_shape_dist(
beta1,
beta2,
mode = "O",
alignment = TRUE,
rotation = TRUE,
scale = TRUE,
include.length = FALSE,
lambda = 0
)
Arguments
beta1 |
A numeric matrix of shape |
beta2 |
A numeric matrix of shape |
mode |
A character string specifying whether the input curves should be
considered open ( |
alignment |
A boolean value specifying whether the curves should be
aligned before computing the distance matrix. Defaults to |
rotation |
A boolean specifying whether the distance should be made
invariant by rotation. Defaults to |
scale |
A boolean specifying whether the distance should be made
invariant by scaling. This is effectively achieved by making SRVFs having
unit length and switching to an appropriate metric on the sphere between
normalized SRVFs. Defaults to |
include.length |
A boolean specifying whether to include information
about the actual length of the SRVFs in the metric when using normalized
SRVFs to achieve scale invariance. This only applies if |
lambda |
A numeric value specifying the weight of a penalty term that
constraints the warping function to be not too far from the identity.
Defaults to |
Details
Distances are computed between the SRVFs of the original curves. Hence, they
are intrinsically invariant to position. The user can then choose to make
distances invariant to rotation and scaling by setting rotation
and scale
accordingly. Distances can also be made invariant to reparametrization by
setting alignment = TRUE
, in which case curves are aligned using an
appropriate action of the diffeomorphism group on the space of SRVFs.
Value
A list with the following components:
-
d
: the amplitude (geodesic) distance; -
dx
: the phase distance; -
q1
: the SRVF ofbeta1
; -
q2n
: the SRVF ofbeta2
after alignment and possible optimal rotation and scaling; -
beta1
: the input curvebeta1
; -
beta2n
: the input curvebeta2
after alignment and possible optimal rotation and scaling. -
R
: the optimal rotation matrix that has been applied to the second curve; -
gam
: the optimal warping function that has been applied to the second curve; -
betascale
: the optimal scaling factor that has been applied to the second curve.
References
Srivastava, A., Klassen, E., Joshi, S., Jermyn, I., (2011). Shape analysis of elastic curves in euclidean spaces. Pattern Analysis and Machine Intelligence, IEEE Transactions on 33 (7), 1415-1428.
Kurtek, S., Srivastava, A., Klassen, E., and Ding, Z. (2012), “Statistical Modeling of Curves Using Shapes and Related Features,” Journal of the American Statistical Association, 107, 1152–1165.
Srivastava, A., Klassen, E. P. (2016). Functional and shape data analysis, 1. New York: Springer.
Examples
out <- calc_shape_dist(beta[, , 1, 1], beta[, , 1, 4])