Gower's Distance
   HOME

TheInfoList



OR:

In
statistics Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
, Gower's distance between two mixed-type objects is a
similarity measure In statistics and related fields, a similarity measure or similarity function or similarity metric is a real-valued function that quantifies the similarity between two objects. Although no single definition of a similarity exists, usually such mea ...
that can handle different types of data within the same dataset and is particularly useful in
cluster analysis Cluster analysis or clustering is the data analyzing technique in which task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more Similarity measure, similar (in some specific sense defined by the ...
or other multivariate statistical techniques. Data can be binary, ordinal, or continuous variables. It works by normalizing the differences between each pair of variables and then computing a weighted average of these differences. The distance was defined in 1971 by Gower and it takes values between 0 and 1 with smaller values indicating higher similarity.


Definition

For two objects i and j having p descriptors, the similarity S is defined as: S_ = \frac, where the w_ are non-negative weights usually set to 1 and s_ is the similarity between the two objects regarding their k-th variable. If the variable is binary or ordinal, the values of s_ are 0 or 1, with 1 denoting equality. If the variable is continuous, s_ = 1- \frac with R_k being the range of k-th variable and thus ensuring 0\leq s_\leq 1. As a result, the overall similarity S_ between two objects is the weighted average of the similarities calculated for all their descriptors. In its original exposition, the distance does not treat ordinal variables in a special manner. In the 1990s, first Kaufman and Rousseeuw and later Podani suggested extensions where the ordering of an ordinal feature is used. For example, Podani obtains relative rank differences as s_ = 1- \frac with r being the ranks corresponding to the ordered categories of the k-th variable.


Software implementations

Many programming languages and statistical packages, such as R, Python, etc., include implementations of Gower's distance. The implementations may follow Kaufmann and Rousseeuw's extensions, which change the similarity for continuous variables to s_ = \frac


References

{{reflist Statistical distance Similarity measures