scipy.spatial.distance.mahalanobis

scipy.spatial.distance.mahalanobis(u, v, VI)

Computes the Mahalanobis distance between two n-vectors u and v, which is defiend as

(u-v)V^{-1}(u-v)^T

where VI is the inverse covariance matrix V^{-1}.

Parameters :

u : ndarray

An n-dimensional vector.

v : ndarray

An n-dimensional vector.

Returns :

d : double

The Mahalanobis distance between vectors u and v.

Previous topic

scipy.spatial.distance.kulsinski

Next topic

scipy.spatial.distance.matching

This Page