Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

L2metric

Fast Computation of the L^2 Metric for Sets of Functional Data


Description

Returns the matrix of L^2 distances between two sets of functional data.

Usage

L2metric(A, B)

Arguments

A

Functions of the first set, represented by a matrix of their functional values of size m*d. m stands for the number of functions, d is the number of the equi-distant points 1,...,d in the domain of the data [1,d] at which the functional values of the m functions are evaluated.

B

Functions of the second set, represented by a matrix of their functional values of size n*d. n stands for the number of functions, d is the number of the equi-distant points 1,...,d in the domain of the data [1,d] at which the functional values of the n functions are evaluated. The grid of observation points for the functions A and B must be the same.

Details

For two sets of functional data of sizes m and n represented by matrices of their functional values on the common domain 1,...,d, this function returns the symmetric matrix of size m*n whose entry in the i-th row and j-th column is the approximated L^2 distance of the i-th function from the first set, and the j-th function from the second set. This function is utilized in the computation of the h-mode depth.

Value

A symmetric matrix of the distances of the functions of size m*n.

Author(s)

See Also

Examples

datapop = dataf2rawfd(dataf.population()$dataf,range=c(1950,2015),d=66)
A = datapop[1:20,]
B = datapop[21:50,]
L2metric(A,B)

ddalpha

Depth-Based Classification and Calculation of Data Depth

v1.3.11
GPL-2
Authors
Oleksii Pokotylo [aut, cre], Pavlo Mozharovskyi [aut], Rainer Dyckerhoff [aut], Stanislav Nagy [aut]
Initial release
2020-01-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.