Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Distance and Similarity Measures

Different measures of distance or similarity are convenient for different types of analysis. The Wolfram Language provides built-in functions for many standard distance measures, as well as the capability to give a symbolic definition for an arbitrary measure.

ReferenceReference

Numerical Data

EuclideanDistance  ▪  SquaredEuclideanDistance  ▪  NormalizedSquaredEuclideanDistance  ▪  ManhattanDistance  ▪  ChessboardDistance  ▪  BrayCurtisDistance  ▪  CanberraDistance  ▪  CosineDistance  ▪  CorrelationDistance  ▪  BinaryDistance  ▪  TimeWarpingDistance

Boolean Data

HammingDistance  ▪  JaccardDissimilarity  ▪  MatchingDissimilarity  ▪  DiceDissimilarity  ▪  RogersTanimotoDissimilarity  ▪  RussellRaoDissimilarity  ▪  SokalSneathDissimilarity  ▪  YuleDissimilarity

String Data

EditDistance  ▪  DamerauLevenshteinDistance  ▪  HammingDistance  ▪  SmithWatermanSimilarity  ▪  NeedlemanWunschSimilarity

Images & Colors

ImageDistance  ▪  ColorDistance

Geospatial & Temporal Data

GeoDistance  ▪  TravelDistance  ▪  TravelTime  ▪  DateDifference

DistanceFunction option for specifying distance functions

DistanceMatrix matrix of pairwise distances between elements

Nearest  ▪  FindClusters  ▪  MeanShift  ▪  FindShortestTour  ▪  SequenceAlignment  ▪  DistanceTransform  ▪  GraphDistance

Visualization

Dendrogram  ▪  ClusteringTree