Canberra Distance

Decision Sciences
Introduced by
Geoffrey Lance and William Williams
Year
1967
Type
Normalized city-block distance
Family
Distance metric

What does it do?

Canberra distance is a distance between two vectors, computed by summing, over all dimensions, the absolute difference of each pair of components divided by the sum of their absolute values.

Unlike Manhattan distance, which sums raw absolute differences, each dimension is scaled by its own magnitude. The basic formula uses no user-defined weights, although weighted variants that multiply each term by a nonnegative weight exist. The metric was introduced by Geoffrey Lance and William Williams in 1966 and is used where relative rather than absolute differences matter.

The intuition behind the method

Think of Canberra distance as a sum of proportional differences. Instead of adding absolute differences directly, as Manhattan distance does, each difference is divided by the combined magnitude of the two values being compared before the terms are summed. As a result, a given absolute difference between two small values contributes more than the same difference between two large values. The metric is therefore useful when relative change matters more than absolute change.

History

Canberra distance was introduced by Geoffrey Lance and William Williams in 1966, and standard treatments of dissimilarity measures cite it under that attribution, for example Everitt, Landau and Lee's Cluster Analysis (Table 3.4). Lance and Williams later treated classificatory sorting and clustering systems in a general framework (1967). That paper is cited for this broader context rather than as the source of the metric's definition. The metric has since been used in taxonomic and ecological comparisons, where relative differences between components are of interest, and in comparisons of the outputs of decision-making methods.

When to use it

Choose Canberra distance when the components are proportions, abundances or other quantities for which a difference is best judged relative to the size of the values, for example comparing community profiles. It is a reasonable choice when a relative difference in a small-valued dimension should not be swamped by absolute differences in large-valued dimensions. Do not use it when many dimensions are zero in both vectors unless the convention for such terms (setting them to 0) is stated and applied consistently. Avoid it when absolute magnitude differences are the main concern, since Manhattan or Euclidean distance will reflect those more directly.

Limitations and considerations

  • Each term has an undefined 0/0 form when both components are zero; the standard convention sets such terms to 0, so vectors with many shared zeros need that convention stated and their result interpreted with care.
  • Near-zero components make individual terms very sensitive to small absolute changes, which can dominate the total distance.
  • Because the normalization is per dimension, the total distance does not reflect the overall size of the vectors.
  • Computing the per-dimension denominators is somewhat more work than Manhattan distance, although the difference is small in practice.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Each dimension is normalized by its own magnitude, so no separate weights or rescaling step is needed to make small-valued and large-valued components comparable.
  • Differences between small values contribute more than the same absolute differences between large values, which suits relative-change questions.
  • Its per-term interpretation is simple: each term is the difference expressed as a share of the combined magnitude of the two components.

Applications

  • Ecological community comparison: comparing species profiles in which relative abundance matters more than raw counts.
  • Taxonomy and clustering: grouping organisms or objects on trait proportions rather than raw trait values.
  • Decision-making: measuring how similar the outputs of several MCDM methods are to a reference method. In one material-selection study, Canberra distance was applied alongside Manhattan, Chi-square and Hamming distances to compare each method with SRP.

How it works

How it works

1

For each dimension, calculate the absolute difference between the two vector components.

Formula
|x_k - y_k|
2

Divide each absolute difference by the sum of the absolute values of the two components in that same dimension. The scaling is therefore local to each dimension, not to the vector as a whole. If both components are zero, the term is set to 0 by convention, because the expression 0/0 is undefined.

Formula
\frac{|x_k - y_k|}{|x_k| + |y_k|} \quad (\text{term} = 0 \text{ if } x_k = y_k = 0)
3

Sum all the normalized differences to obtain the final Canberra distance: d(x, y) = sum over k = 1, ..., p of |x_k - y_k| / (|x_k| + |y_k|). Each term lies between 0 and 1, so no single dimension can add more than 1 to the total.

Formula
d(x,y) = \sum_{k=1}^{p} \frac{|x_k - y_k|}{|x_k| + |y_k|}

Common pitfalls

  • Forgetting to handle dimensions where both components are zero; the term has a zero denominator and must be set to 0 by an explicit, stated convention.
  • Reading a large Canberra distance driven by near-zero components as evidence of an important absolute difference.
  • Applying the metric to data where absolute differences carry domain meaning, so that the relative weighting it imposes distorts the comparison.
  • Reporting the result without stating how zero-valued dimensions were treated, which makes comparisons between analyses unreliable.

Frequently asked questions

What is the key difference between Canberra and Manhattan distance?

Manhattan distance sums absolute differences directly. Canberra distance divides each difference by the sum of the absolute values of the two components in that dimension before summing, so it emphasizes relative differences and is more sensitive to changes among small values.

How do zero values affect Canberra distance?

If both components are zero in a dimension, the term has the form 0/0 and is undefined by the formula. The standard convention sets it to 0, and this convention should be stated with the result. A term with exactly one zero component equals 1, which is the largest value a term can take, so each dimension's contribution lies between 0 and 1. This limits how much any single dimension can add to the total, although such a term still represents a large relative difference.

When should I use Canberra instead of Euclidean distance?

Use Canberra when relative or proportional differences matter more than absolute separation, such as with compositional data, ecological profiles or normalized preference vectors. Use Euclidean distance when the absolute geometric separation between vectors is the quantity of interest.

Is Canberra distance a weighted version of Manhattan distance?

Not in the usual sense. The basic formula uses no user-defined weights. Each dimension is instead normalized by its own component magnitudes, which changes how dimensions contribute. Weighted variants do exist, in which each term is multiplied by a nonnegative weight w_k.

Related methods

Sources

  1. Lance, G. N., & Williams, W. T. (1967). A general theory of classificatory sorting strategies. Computer Journal, 10(3), 271-277.

    Open DOI reference
  2. Cantrell, C. D. (1971). A review of taxonomic methods. Taxon, 20(2), 157-175.

    Open publication reference
  3. Cluster Analysis (Everitt, Landau and Lee; library copy), Table 3.4 (D4: Canberra distance, citing Lance and Williams, 1966), p. 50

  4. 02_066adee9de07fc7483e910b41cde91bf89f2fd2d (Scientific Reports material-selection study comparing MCDM methods; Canberra distance comparison), p. 25-26