The Gaussian Discriminant Functions contain a distance between the pattern and the class mean . This distance is the Mahalanobis distance. It scales the distance by the covariance of the class. The Euclidean distance does not.

Main idea

All points on one ellipse of equal probability density have the same Mahalanobis distance to the mean, but different Euclidean distances.


Definitions

Square of the Mahalanobis distance between and :

Square of the Euclidean distance:

Both and are squared distances. When , the two are the same.


1D Case

In 1D, the Mahalanobis distance measures the distance in units of the standard deviation . For example, the points have for any . The slide marks about 2.5% of the probability in each red tail near (the exact 2.5% point is ).


2D Case

What the figure shows:

  • samples from a 2D Gaussian lie in a cloud centred on the mean
  • the ellipses are lines of equal probability density
  • the density depends on only through , so each ellipse is a line of constant Mahalanobis distance
  • points on one ellipse have different Euclidean distances to the mean
Mahalanobis Euclidean
Uses covarianceYes, through No
Lines of equal distanceEllipses (ellipsoids)Circles (spheres)
Classifier that uses itQuadratic and linear Gaussian classifiersMinimum distance classifier