50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


fda.usc (version 2.0.2)

metric.hausdorff: Compute the Hausdorff distances between two curves.

Description

Hausdorff distance is the greatest of all the distances from a point in one curve to the closest point in the other curve (been closest the euclidean distance).

Usage

metric.hausdorff(fdata1, fdata2 = fdata1)

Arguments

fdata1

Curves 1 of fdata class. The dimension of fdata1 object is (n1 x m), where n1 is the number of points observed in t coordinates with lenght m.

fdata2

Curves 2 of fdata class. The dimension of fdata2 object is (n2 x m), where n2 is the number of points observed in t coordinates with lenght m.

Author

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@usc.es

Details

Let G(X)={(t,X(t))R2} and G(Y)={(t,Y(t))R2} be two graphs of the considered curves X and Y respectively, the Hausdorff distance dH(X,Y) is defined as,

dH(X,Y)=max{supxG(X)infyG(Y)d2(x,y),supyG(Y)infxG(X)d2(x,y)}, where d2(x,y) is the euclidean distance, see metric.lp.

Examples

Run this code
if (FALSE) {   
data(poblenou)
nox<-poblenou$nox[1:6]
# Hausdorff vs maximum distance
out1<-metric.hausdorff(nox)       
out2<-metric.lp(nox,lp=0) 
out1
out2
par(mfrow=c(1,3))
plot(nox)
plot(hclust(as.dist(out1)))
plot(hclust(as.dist(out2)))
}   

Run the code above in your browser using DataLab