Skip to content

Gower's Distance

Compare mixed-type records by converting each available feature to a bounded type-appropriate similarity or dissimilarity, then taking a weighted pairwise average with missingness and binary-presence rules in the denominator.

Version
v3 · 2026-09-19 · History
Domain-specific #
1948
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomain
Multivariate Analysis → Experimental Design & Statistics
Aliases
Gower distance, Gower dissimilarity, Gower similarity coefficient, Gower coefficient

Core Idea

Gower's construction compares objects described by different variable types. For records \(i,j\) and variables \(k=1,\ldots,p\), define a type-appropriate feature similarity \(s_{ijk}\in[0,1]\), a nonnegative importance weight \(w_k\), and an availability indicator \(\delta_{ijk}\). Then

\[ S_{ij}=\frac{\sum_k \delta_{ijk}w_k s_{ijk}} {\sum_k \delta_{ijk}w_k}. \]

The common Gower dissimilarity is \(D_{ij}=1-S_{ij}\), though some analyses use \(\sqrt{1-S_{ij}}\); the convention must be named.[1]

How would you explain it like I'm…

The Mix-and-Match Difference Score

Imagine comparing two stuffed animals. You check each thing about them, like 'same color?' or 'how close in size?', and give each check a score from 0 (totally different) to 1 (the same). If you can't see one thing, you just skip it. Then you average the scores you have. Gower's Distance tells you how different the two animals are: close to 0 means very alike, close to 1 means very different.

Comparing Apples and Oranges

Gower's Distance compares two things described by different kinds of information, like words (red or blue), yes/no facts, and numbers (height). For each feature, you give a similarity score between 0 (totally different) and 1 (exactly the same), using a rule that fits that kind of feature. Some features can count more than others. If a feature is missing for one of the things, it's left out. The overall similarity is the weighted average of the scores, and the distance is usually 1 minus that similarity.

Mixed-Type Weighted Dissimilarity

Gower's Distance compares records that mix variable types, such as heights (numbers), eye color (categories) and smoker yes/no. For each variable k you compute a similarity s between 0 and 1 using a rule suited to that type. You also give it a nonnegative weight w and an indicator δ that is 0 when the comparison can't be made, for example because of missing data. The overall similarity S is the sum of δ·w·s divided by the sum of δ·w, a weighted average over the usable variables. The usual Gower dissimilarity is D = 1 − S. Some analysts use √(1 − S) instead, so you should always say which version you use. Unlike ordinary straight-line distance, it works when variables aren't all numbers.

 

Gower's construction provides a (dis)similarity coefficient for objects described by heterogeneous variable types. For records i and j and variables k = 1,…,p, it uses three ingredients: - a type-appropriate feature similarity s_ijk in [0,1]; - a nonnegative weight w_k; - an availability indicator δ_ijk, which drops comparisons that cannot be made. The overall similarity is S_ij = Σ_k δ_ijk w_k s_ijk / Σ_k δ_ijk w_k, a weighted mean over the usable variables. Because each component lies in [0,1], S_ij does as well. The standard Gower dissimilarity is D_ij = 1 − S_ij. An alternative convention, √(1 − S_ij), also appears, so any analysis must state which transform it uses.

Structural Signature

  • Two records in a common mixed-type schema.
  • Per-feature type declarations.
  • Featurewise bounded similarity or dissimilarity rules.
  • Quantitative scaling by a declared range or scale.
  • Nominal equality/inequality scoring.
  • Symmetric or asymmetric binary semantics.
  • Optional ordinal rank transformation.
  • Pairwise availability indicators for missing values.
  • Nonnegative feature weights.
  • A denominator containing only comparable, relevant features.
  • An aggregate bounded score.
  • A declared similarity-to-dissimilarity transform.

What It Is Not

It is not ordinary Euclidean distance applied to category codes. It is not Hamming distance, which treats all mismatches uniformly. It is not one uniquely standardized treatment of ordinal data; the original paper and later extensions differ. It is not automatically a metric under every combination of feature rules, weights, missingness, and transform.

Scope of Application

Gower scores support clustering, ordination, nearest-neighbor search, ecology, taxonomy, medicine, and survey analysis when records mix continuous, categorical, binary, and ordinal variables. The original coefficient was designed to include several existing coefficients and to permit incomplete comparisons.[1]

Clarity

Declare every variable type, scale/range source, weight, missingness policy, binary symmetry choice, ordinal transform, and final distance transform. Fit data-dependent ranges on the training or reference data and reuse them; recomputing ranges per split silently changes geometry. Define behavior when no feature is jointly comparable.

Manages Complexity

The method makes heterogeneous attributes commensurable without pretending their raw units share one Euclidean scale. Pairwise availability avoids imputing every missing value, while the denominator prevents absent features from being counted as agreements. One matrix can then feed standard multivariate algorithms.

Abstract Reasoning

  1. Type and validate each feature.
  2. Choose feature scales and weights.
  3. For each record pair, mark comparable features.
  4. Compute quantitative similarity as \(1-|x_{ik}-x_{jk}|/R_k\).
  5. Score nominal equality and binary presence under declared rules.
  6. Rank-transform ordinal variables if using an extension.
  7. Average only valid weighted scores.
  8. Convert similarity to the declared dissimilarity.
  9. Audit metric properties and sensitivity before downstream use.

Knowledge Transfer

The portable pattern is normalize each heterogeneous comparison in its native semantics, then average only commensurable evidence. It transfers to composite matching and multi-criteria record linkage. The proposed immediate parent is Similarity Measure.

Examples

For age, occupation, and a rare symptom, age can use range-scaled absolute difference, occupation exact nominal agreement, and the symptom asymmetric binary scoring so joint absence contributes no evidence. If occupation is missing for one member, it is removed from that pair's numerator and denominator rather than scored as a mismatch.

Kaufman and Rousseeuw operationalize Gower-style dissimilarities in mixed-data clustering, including the PAM/DAISY framework.[2] Podani proposes rank-sensitive extensions for ordinal characters rather than treating them as merely nominal.[3]

Structural Tensions

  • Mixed-type comparability versus loss of feature-specific geometry.
  • Range normalization versus outlier sensitivity.
  • Missing-feature exclusion versus pair-dependent geometry.
  • Equal feature influence versus user weights.
  • Similarity coefficient versus distance terminology.
  • Ordinal ordering versus unequal category spacing.

Structural–Framed Character

Normalization, weighting, availability gating, and aggregation are structural. Mixed statistical variable types, asymmetric binary meaning, rank transforms, and Gower's coefficient conventions are constitutive. The identity is domain-specific.

Structural Core vs. Domain Accent

The portable core is type-specific comparison -> common bounded scale -> availability-weighted average. The domain accent is mixed-type multivariate data.

This entry is a kind of Similarity Measure.

Similarity Measure is the broader abstraction this entry instantiates. Metric, Ratio, Measurement, Missing Data Mechanisms, and Clustering are related. Metric status must be established for the chosen variant rather than assumed from the word “distance.”

Relationships to Other Abstractions

Local relationship map for Gower's DistanceParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Gower's DistanceDOMAINPrime abstraction: Similarity Measure — is a kind ofSimilarityMeasurePRIME

Current abstraction Gower's Distance Domain-specific

Parents (1) — outgoing typed relations

  • Gower's Distance is a kind of Similarity Measure Prime

    Similarity Measure is the broader abstraction this entry instantiates.

Hierarchy paths (2) — routes to 2 parentless roots

Neighborhood in Abstraction Space

Gower's Distance sits in a sparse region of the domain-specific corpus (94th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (2769 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25

Not to Be Confused With

  • Euclidean distance on encoded categories.
  • Hamming distance.
  • Jaccard distance alone.
  • One mandatory ordinal extension.
  • A metric under all missingness patterns.
  • The untransformed similarity \(S_{ij}\) when reporting dissimilarity.

References

[1] J. C. Gower, “A General Coefficient of Similarity and Some of Its Properties,” Biometrics 27 (1971): 857–871, doi:10.2307/2528823. registry ↩a ↩b

[2] Leonard Kaufman and Peter J. Rousseeuw, Finding Groups in Data: An Introduction to Cluster Analysis (Wiley, 1990), doi:10.1002/9780470316801. registry ↩

[3] János Podani, “Extending Gower's General Coefficient of Similarity to Ordinal Characters,” Taxon 48 (1999): 331–340, doi:10.2307/1224438. registry ↩

[4] Sandrine Pavoine et al., “On the Challenge of Treating Various Types of Variables: Application for Improving the Measurement of Functional Diversity,” Oikos 118 (2009): 391–402, doi:10.1111/j.1600-0706.2008.16668.x. registry ↩