For rows , three useful choices are Euclidean distance, standardized Euclidean distance, and Mahalanobis distance:
The Euclidean choice is simple, rotation invariant and appropriate when the original coordinate scales carry comparable meaning. It is sensitive to scale changes, may be dominated by a high-variance variable and gives correlated or duplicate variables repeated influence. Squared Euclidean dissimilarity is sometimes used algorithmically, but removing the square root generally loses the triangle inequality.
The standardized Euclidean choice removes marginal units using fixed positive sample scales . It gives equal marginal weight to variables, but ignores correlations and can magnify noise when an estimated variance is small. Constant variables require omission or an explicitly chosen positive external scale.
The Mahalanobis choice incorporates the full positive-definite sample covariance , so it is Euclidean distance after whitening. It accounts for both scale and redundancy and is invariant under an invertible change of coordinates when is transformed consistently. However estimating requires enough observations and can be sensitive to extreme values; inversion is unstable near singularity and unavailable when is singular. With fixed positive scales or positive-definite , all three square-root expressions are genuine metrics on the measurement space. Their different geometries encode different notions of which individuals should be considered similar.
A metric dissimilarity must satisfy, for all , the four properties
They are nonnegativity, identity of indiscernibles, symmetry and the triangle inequality. The following two transformations of the simple matching coefficient behave differently at the identity.
For fixed , the complement of the simple matching coefficient is the fraction of coordinates that disagree:
This is the normalized Hamming distance. It is nonnegative, symmetric, and is zero exactly when every coordinate agrees. At each coordinate,
Summing and dividing by proves the triangle inequality. Therefore is a metric on the binary vectors.
For every binary vector , , and hence
Thus is not a metric, because it fails identity of indiscernibles. It is nonnegative and symmetric. In fact it also satisfies the triangle inequality trivially: every value lies in , so . That does not repair its nonzero self-distance.
In agglomerative hierarchical clustering, start with eight singleton groups. Single-linkage clustering uses the smallest distance between cross-pairs; complete-linkage clustering uses the largest. Updating these cluster distances after each merge, one valid order of the tied merges gives
The merges at height may be reordered; they give the same requested three-cluster cuts. For example, the single-link distance from to is , while its complete-link distance is their maximum . After forming , its single-link distance to is . The complete-link distance between and is . Finally the closest cross-pair between and is at , while the farthest is at .
At three groups the partitions are therefore
Two groups, and , are more strongly supported by the merge heights. For single linkage the three-to-two merge is at , close to the preceding height , whereas the two-to-one merge is delayed until . For complete linkage the three-to-two merge at is close to , whereas the final merge jumps to . Both methods agree on the two-group partition but split its second group differently when forced to return three groups. A three-group choice is possible if required substantively, but is not particularly compelling from these dissimilarities alone.

Articles by others on the same topic (0)

There are currently no matching articles.