Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Numerical Data > Exploratory Data Analysis >
Mathematica > Data Manipulation > Statistics > Exploratory Data Analysis >
Mathematica > Mathematics and Algorithms > Statistics > Exploratory Data Analysis >

DistanceFunction

DistanceFunction
is an option for functions such as Nearest that specifies the distance value to assume between any two specified points.
  • DistanceFunction->f specifies that the distance assumed between x and y should be f[x, y].
Find points closest to {5,5} using ChessboardDistance:
Use the default distance:
Find clusters in Boolean data using DiceDissimilarity:
Clusters obtained with the default distance function:
Find points closest to {5,5} 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]=
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team