Learn R Programming

BIDistances (version 0.1.3)

FractionalDistance: Calculates fractional distances

Description

Calculates distance matrix, through \(\left( \sum_{i=1}^{n} |x_i - y_i|^p \right)^{1/p}\)

Usage

FractionalDistance(Data, p)

Value

DistanceMatrix

[1:n,1:n] symmetric Matrix, containing the distances between the cases (rows) of the input matrix

Arguments

Data

[1:n,1:d] Matrix, with n cases, d variables

p

Scalar, value for p

Author

Michael Thrun

Details

Values of p < 1 can be used, which can be useful for high-dimensional data, see references.

References

Aggrawal, C. C., Hinneburg, A., Keim, D. (2001), On the Suprising Behavior of Distance Metrics in High Dimensional Space.

Examples

Run this code
data(Hepta)
distMatrix = FractionalDistance(Hepta$Data, p = 1/2)

Run the code above in your browser using DataLab