Learn R Programming

fdasrvf (version 2.3.6)

get_warping_distance: Computes the distance between two warping functions

Description

Computes the distance between two warping functions

Usage

get_warping_distance(gam1fun, gam2fun)

Value

A numeric value storing the distance between the two warping functions.

Arguments

gam1fun

A function that takes a numeric vector \(s\) of values in \([0, 1]\) as input and returns the values of the first warping function at \(s\).

gam2fun

A function that takes a numeric vector \(s\) of values in \([0, 1]\) as input and returns the values of the second warping function at \(s\).

Examples

Run this code
gam1 <- discrete2warping(toy_warp$gam[, 1])
gam2 <- discrete2warping(toy_warp$gam[, 2])
get_warping_distance(gam1, gam2)
get_warping_distance(gam1, get_identity_warping())

Run the code above in your browser using DataLab