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 L \times M specifying an L-dimensional curve evaluated on M sample points.

beta2

A numeric matrix of shape L \times M specifying an L-dimensional curve evaluated on M sample points. This curve will be aligned to beta1.

mode

A character string specifying whether the input curves should be considered open (mode == "O") or closed (mode == "C"). Defaults to "O".

alignment

A boolean value specifying whether the curves should be aligned before computing the distance matrix. Defaults to TRUE.

rotation

A boolean specifying whether the distance should be made invariant by rotation. Defaults to TRUE.

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 TRUE.

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 scale == TRUE. Defaults to FALSE.

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 0.0.

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:

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])

[Package fdasrvf version 2.3.1 Index]