fdadist | R Documentation |
This function computes the matrix of pairwise distances between curves a functional data sample. This can be achieved with or without phase and amplitude separation, which can be done using a variety of warping classes.
fdadist(
x,
y = NULL,
warping_class = c("affine", "dilation", "none", "shift", "srsf"),
metric = c("l2", "pearson"),
cluster_on_phase = FALSE,
labels = NULL
)
x |
A numeric vector of length |
y |
Either a numeric matrix of shape |
warping_class |
A string specifying the warping class Choices are
|
metric |
A string specifying the metric used to compare curves. Choices
are |
cluster_on_phase |
A boolean specifying whether clustering should be
based on phase variation or amplitude variation. Defaults to |
labels |
A character vector specifying curve labels. Defaults to |
A stats::dist object storing the distance matrix between the input
curves using the metric specified through the argument metric
and the
warping class specified by the argument warping_class
.
idx <- c(1:5, 11:15, 21:25)
D <- fdadist(simulated30_sub$x[idx, ], simulated30_sub$y[idx, , ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.