Learn R Programming

fdasrvf (version 2.2.0)

calc_shape_dist: Elastic Shape Distance

Description

Calculate elastic shape distance between two curves beta1 and beta2. If the curves beta1 and beta2 are describing multidimensional functional data, then rotation == FALSE and mode == 'O'

Usage

calc_shape_dist(
  beta1,
  beta2,
  mode = "O",
  rotation = TRUE,
  scale = TRUE,
  include.length = FALSE
)

Value

Returns a list containing

d

geodesic distance

dx

phase distance

q1

srvf of curve 1

q2n

srvf of aligned curve 2

Arguments

beta1

curve1, provided as a matrix of sizes \(n\times T\) for \(n\)-dimensional curve on \(T\) sample points

beta2

curve 2, provided as a matrix of sizes \(n\times T\) for \(n\)-dimensional curve on \(T\) sample points

mode

Open ("O") or Closed ("C") curves

rotation

Include rotation (default = TRUE)

scale

scale curves to unit length (default = TRUE)

include.length

include length in distance calculation (default = FALSE) this only applies if scale=TRUE

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.

Examples

Run this code
out <- calc_shape_dist(beta[, , 1, 1], beta[, , 1, 4])

Run the code above in your browser using DataLab