Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

Hi! Great question β€” Gower's distance is not natively implemented in scikit-learn as a built-in metric, but there are excellent ways to use it in your workflows.

Current Status in scikit-learn

scikit-learn's distance metrics (in sklearn.metrics.pairwise) and clustering algorithms like AgglomerativeClustering do not include Gower's distance out of the box. AgglomerativeClustering supports Euclidean, Manhattan, cosine, and precomputed distance matrices β€” but not Gower directly.

What is Gower's Distance?

Gower's distance (Gower, 1971) is specifically designed for mixed-type data (numerical + categorical + binary features). For each feature pair, it computes:

  • Numerical features: Normalized a…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Daniel15568
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants