HIERARCHICAL CLUSTERING 程序包 符号

# DistanceMatrix

DistanceMatrix[list]
gives a matrix of distances or dissimilarities between the elements of list.

## 更多信息更多信息

• To use , you first need to load the Hierarchical Clustering Package using Needs["HierarchicalClustering`"].
• The elements of list can be numeric lists, matrices, or tensors, lists of Boolean elements, or strings. All data elements must have the same dimensions.
• returns a symmetric matrix suitable for use by DirectAgglomerate.
• The method used to compute dissimilarities can be selected with the DistanceFunction option.
• With the default setting , uses the square of EuclideanDistance for numeric data, JaccardDissimilarity for Boolean data, and EditDistance for string data.
• The setting for DistanceFunction can be any distance or dissimilarity function or a pure function f defining a distance between two values.

## 范例范例打开所有单元关闭所有单元

### 基本范例 (1)基本范例 (1)

Distance matrix for a list of numbers:

 Out[2]=

## 教程教程

New to Mathematica? Find your learning path »
Have a question? Ask support »