Wolfram Language & System 11.0 (2016)|Legacy Documentation
This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)
gives the matrix of distances between each pair of elements ui, uj.
gives the matrix of distances between each pair of elements ui, vj.
- DistanceMatrix works for a variety of data, including numerical, geospatial, textual, and visual, as well as dates and times.
- The following options can be given:
DistanceFunction Automatic the distance metric to use PerformanceGoal Automatic aspects of performance to try to optimize WorkingPrecision Automatic precision to use for numerical data
- The setting for DistanceFunction can be any distance or dissimilarity function or a function f defining a distance between two values.
- By default, the following distance functions are used for different types of elements:
EuclideanDistance numeric data ImageDistance images JaccardDissimilarity Boolean data EditDistance strings Abs[DateDifference[#1,#2]]& dates and times ColorDistance colors GeoDistance geospatial data
- All images are first conformed using ConformImages.
- Possible settings for PerformanceGoal include:
"Speed" minimize computation time "Quality" maximize precision and accuracy Automatic automatic tradeoff between speed and precision
Introduced in 2015