Compute the (squared) Mahalanobis distance between two groups of vectorsKevin R. CoombesP. Roebuck
SAS/IML supports the MAHALANOBIS function, which computes the Mahalanobis distance (MD) for a set of multivariate data. The problem you will encounter is that when p > N, the sample covariance matrix is going to be singular because the data spans at most an N-dimen...
其实这个问题主要就是由于scikit-learn的版本问题 API Change From version 0.25, metrics.pairwise.pairwise_distances will no longer automatically compute the VI parameter for Mahalanobis distance and the V parameter for seuclidean distance if Y is passed. 因此最简单的解决方案就是说把scikit-learn的版本...