DistanceFunction

DistanceFunction
is an option for functions such as Nearest that specifies the distance value to assume between any two specified points.

DetailsDetails

  • DistanceFunction->f specifies that the distance assumed between x and y should be .

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Find points closest to using ChessboardDistance:

In[1]:=
Click for copyable input
Out[1]=

Use the default distance:

In[2]:=
Click for copyable input
Out[2]=

Find clusters in Boolean data using DiceDissimilarity:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Clusters obtained with the default distance function:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2007
(6.0)