Computes the Euclidean distance between two data sets (2 norm).
NMath (in NMath.dll) Version: 7.4
public static double EuclideanDistance(
Public Shared Function EuclideanDistance (
data1 As DoubleVector,
data2 As DoubleVector
) As Double
static double EuclideanDistance(
static member EuclideanDistance :
data1 : DoubleVector *
data2 : DoubleVector -> float
- data1 DoubleVector
- The first data set.
- data2 DoubleVector
- The second data set.
The distance between data1
Euclidean distance is simply the geometric distance in the
multidimensional space. This distance is computed as:
distance( x, y ) = sqrt( sum ( xi - yi )^2 )
Missing values are allowed. Pairs of elements are excluded from the
distance measure when their comparison returns NaN. If all pairs are
excluded, NaN is returned for the distance measure.