4 ms·
relatedly, euclidean distance is a shitty metric in high dimension.
by hprotagonist 5y ago
relatedly, euclidean distance is a shitty metric in high dimension.
- AnimalMuppet 5y agoHow so? And, what is a better metric, and why?
- hprotagonist 5y agocosine similarity’s a lot better. https://stats.stackexchange.com/questions/99171/why-is-euclidean-distance-not-a-good-metric-in-high-dimensions https://stats.stackexchange.com/questions/99171/why-is-eucli...
- CrazyStat 5y agoCosine similarity is not a distance metric.
- contravariant 5y agoWell it is on the unit sphere, but then it's equivalent to the euclidean metric...
- srean 5y agoDo I spot a geometer here ? You are indeed right but its not something that is well known.
- anon_123g987 5y agoFor example: The Mahalanobis distance is a measure of the distance between a point P and a distribution D, introduced by P. C. Mahalanobis in 1936. It is a multi-dimensional generalization of the idea of measuring how many standard deviations away P is from the mean of D. This distance is zero for P at the mean of D and grows as P moves away from the mean along each principal component axis. If each of these axes is re-scaled to have unit variance, then the Mahalanobis distance corresponds to standard Euclidean distance in the transformed space. The Mahalanobis distance is thus unitless, scale-invariant, and takes into account the correlations of the data set. https://en.wikipedia.org/wiki/Mahalanobis_distance https://en.wikipedia.org/wiki/Mahalanobis_distance
- Dylan16807 5y agoIf all your dimensions are equal to each other then it gives the same result as Euclidean distance? I don't think this counts as better, then.
- CrazyStat 5y agoMahalanobis distance is just a way of stretching Euclidian space to achieve a certain sort of isotropy (it normalizes an ellipsoid to the unit sphere). It is built on top of Euclidian distance and is not an alternative to it.
- anon_123g987 5y agoEuclidian distance works well in 2D and 3D as special cases. I would say Mahalanobis distance is its generalization (yes, built on top of it), which works better in the multidimensional (multivariate) case.
- CrazyStat 5y agoNo. Mahalanobis distance is not an alternative to Euclidian distance because it's not even measuring the same kind of distance. The are incommensurate, both figuratively and literally: Mahalanobis distance is unitless while Euclidian distance is not. Euclidian distance measures the distance between two points, while Mahalanobis measures the distance between a distribution (canonically multivariate normal) and a point. Mahalanobis distance is not a generalization if Euclidian distance, it's an altogether different concept of distance that doesn't even make sense without talking about a distribution with mean and covariance matrix.
- anon_123g987 5y agoWhat has more seeds, an apple or a fruit?
- CrazyStat 5y agoWhat's a better fruit, an apple or an apple pie? Like Mahalanobis distance, apple pie is not a fruit and is not a generalization of an apple.
- amitport 5y agoWhich distance would you chose? And to what purpose?